I have folder with about 1200 files that I need to rename. Theit file extension is .jpg, .gif, and .png for the most part.
Here are some examples:
Awesome\ FB\ \ (462).jpg
Bonus\ FB\ Cover\ Pics\ (80).jpg
Awesome\ FB\ \ (463).jpg
Bonus\ FB\ Cover\ Pics\ (81).jpg
Awesome\ FB\ \ (464).jpg
Bonus\ FB\ Cover\ Pics\ (82).jpg
Awesome\ FB\ \ (465).jpg
Bonus\ FB\ Cover\ Pics\ (83).jpg
I tried:
rename 's/\.{???} $/-img4sm.{???}/' ./*.{???}
I also tried this but just placing a .jpg or .gif instead of {???}, and replacing the {} with [].
I also tried:
find . -type f -iname '*.???' -exec rename 's/\.{???} $/-img4sm.{???}/' ./*.{} +
I've managed to use this command without error messages in CloudLinux (CentOS), but no file names changed.
Please help me. Thank you!