Saturday, April 17, 2010

Changing filenames to lowercase/capital

Changing to ALL lowercase

Say we have tonnes of AVI files:

 for i in *.avi; do mv $i `echo $i |tr [A-Z] [a-z]`;done

Another way around, changing from mixed to CAPITAL

 for i in *.avi; do mv $i `echo $i |tr [a-z] [A-Z]`;done

No comments: