Sunday, April 22, 2012

How to rename multiple files in Ubuntu?

Using the rename command and Perl expression. In the terminal:

To rename all upper case file names with extension .JPG to lower case

Test first.
rename -n 'y/A-Z/a-z/' *.JPG

Execute and show the operation.
rename -v 'y/A-Z/a-z/' *.JPG

To remove all colon character out of of the file name:
rename -vn 's/[:]//g' *

To remove all non-alphanumeric characters:
rename -vn 's/[^A-Za-z0-9._]//g' *

For more inforation, type 'man rename'

No comments:

Post a Comment

GPG Verify DupeGuru

https://dupeguru.voltaicideas.net/ https://github.com/arsenetar/dupeguru/releases/tag/4.3.1 $ gpg --verify dupeguru_macOS_Qt_4.3.1.zip.siggp...