Friday, December 28, 2007

How to rename the extension of multiple files in ubuntu

Recently I needed to rename the extension of many files in one step.
The 'mv' command didn't work, and I tried with different alternatives, such as using 'for' commands.
Finally, I found that Debian based distributions have the 'rename' command.
Following, the syntax for renaming '.jpg' files to '.jpeg'.

rename 's/\.jpg/.jpeg/' *.jpg

Cheers!

Versión en español:
http://es.tuxero.com/2007/12/cmo-renombrar-la-extensin-de-mltiples.html

No comments: