Rename files in folder
Oneliner to rename files/directories. It converts ” ” into “_” and the characters to lower-case.
$> perl -e 'while(< *>) { $old=$_; s/ +/_/g; rename($old,lc($_)); }'
To limit it to a single filetype use it this way and replace ”.doc” with whatever you like.
$> perl -e 'while(< *.doc>) { $old=$_; s/ +/_/g; rename($old,lc($_)); }'