
Have a list of files,
123.jpg do not change
123_1_.jpg => 123_1.jpg
123_10_,jpg => 123_10.jpg
1234.jpg do not change
1234_1_.jpg => 1234_1.jpg
1234_10_.jpg => 1234_10.jpg
Only need to change the files with file names ending with _, then remove the last letter of _.
Right now I have to process these manually, with ???_.jpg, then remove the last letter, then ????_?_.jpg, then ????_??_.jpg. I feel kind of dumb


Appreciated.
Peter