Rename several files
12 files named as
Scan10043.JPG. From their names I want to remove the “Scan” prefix and I want the extension in lowercase.
There is a very handy script for this called
rename which is part of the standard installation. It’s actually a Perl script, written by Larry Wall himself. So:
rename -n 's/Scan(.*)\.JPG/$1.jpg/' *.JPG
First use the
-n switch which means “No Action: show what files would have been renamed.” It means the files are not renamed and you have the chance to verify everything. If it’s OK, just remove the