si_lence has asked for the wisdom of the Perl Monks concerning the following question:
I have a bunch of files, that I would like to upcase the names.
So far I have a small script that does this:
use strict; use warnings; use File::Find; use File::Copy; my $scandir="path/to/files"; my $outpath="path/to/out/directory"; find(\&update, $scandir); sub update() { if (-f $_) { my $file = $_; $file = uc($file); move("$File::Find::name","$outpath/$file") } }
Is there a way to do that in a one-liner?
(the files need not to be copied to a different location, inplace
is fine too)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: rename files to upcase
by davido (Cardinal) on Nov 16, 2004 at 08:13 UTC | |
by gaal (Parson) on Nov 16, 2004 at 09:25 UTC | |
|
Re: rename files to upcase
by eyepopslikeamosquito (Archbishop) on Nov 16, 2004 at 08:23 UTC | |
|
Re: rename files to upcase
by PodMaster (Abbot) on Nov 16, 2004 at 08:14 UTC | |
|
Re: rename files to upcase
by Happy-the-monk (Canon) on Nov 16, 2004 at 08:39 UTC | |
|
Re: rename files to upcase
by TedPride (Priest) on Nov 16, 2004 at 12:51 UTC |