need script

Eden Li plug-discuss@lists.PLUG.phoenix.az.us
Wed, 25 Apr 2001 10:31:14 -0700


use File::Find;

find (sub {
    my $lc = lc ($_);
    system ("mv $File::Find::dir/$_ $File::Find::dir/$lc");
}, $dir);

# where $dir contains the directory you want to recurse
# to lowercase files... you can actually pass a list of dirs
# to find ()


BTW, use at your own risk.  I don't imagine it messing
up too bad, but be warned I haven't tested it.

hope this helps,
Eden
eden.li@asu.edu

 meg@cs.csoft.net wrote:
> Certainly someone must have a script (preferably Perl)
> laying around somewhere that will:
> 
> Recurse thru directories and rename files by replacing
> any UPPER case characters with lower and replacing spaces
> in the file names with something like underscores.