Return to Snippet

Revision: 4557
at January 8, 2008 19:09 by iblis


Updated Code
for F in * ; do NF=`echo $F | perl -lne "s/ /_/g; s/\._/./g; s/[',-]//g; print lc"` ; mv "$F" "$NF" ; done

Revision: 4556
at January 8, 2008 17:36 by iblis


Updated Code
for F in * ; do NF=`echo $F | perl -lne 's /\. /./g; s/ /_/g; print lc'` ; mv "$F" $NF ; done

Revision: 4555
at January 8, 2008 17:28 by iblis


Initial Code
for F in * ; do NF=`echo $F | perl -lne 's /\. /./; s/ /_/g; print lc'` ; mv "$F" $NF ; done

Initial URL


Initial Description
test with echo instead of mv
example removes spaces after dots, replaces spaces with _, removes ' , and -, and finally lowercases filenames

Initial Title
Batch rename files in directory

Initial Tags
files, perl

Initial Language
Bash