[plug] Perl script ?

hooker at iinet.net.au hooker at iinet.net.au
Mon Oct 31 14:00:42 WST 2005


Quoting garry <garbuck at westnet.com.au>:
> I wondering if Perl can do this....
> 
> With a music folder full of upper and lower case directory names, the 
> "alphabeticalness" get mucked up..
> 
> I'd like to be able to change all directory names to lower case..
> 
> Would anyone have faced this before? How did you do it?

#!/bin/sh

cd <directory>
for i in *;do

New=`echo $i | tr [:upper:] [:lower:]`
if [ $i != $New ];then
  mv $i $New
fi

done

Hook



More information about the plug mailing list