Linux: lowercasing the filenames
May 22nd, 2009
No comments
I really hate uppercase when it comes to filenames. It’s really simple to translate words to lowercase using perl’s “tr”.
my @FILES=`ls /path/to/bignames`; foreach my $line (@FILES){ $line=trim($line); if ($line ne "" && $line !~ /^./ && $line =~ /[A-Z]+/) { my $smalline = $line; $smalline =~ tr/[A-Z]/[a-z]/; $out=`mv -v $line $smalline`; }
and this is the complete rename-to-lowercase script.
Please read terms of use before downloading the script(s)