Thursday, November 3, 2011

Mass file renaming

I just learned that Linux's rename command can use regular expressions to  substitute file name parts.

(-v tells you what was renamed)
rename -v 's/FROM/TO/g'  *

This will replace the word FROM to the word TO in all file names.

No comments:

Post a Comment