Re^2: Changing filenames
by
Anonymous Monk
on
Apr 26, 2011 at 00:53 UTC
(
replies
)
http://www.perlmonks.org?node_id=901263
in reply to
Re: Changing filenames
in thread
Changing filenames
Read
perlintro
then you can write program, like
#!/usr/bin/perl --
use
strict
;
use
warnings
;
Main('directory');
sub Main {
open
directory,
read
a list of files ( or
File::Find::Rule
)
loop
over list, and
open
ed a lexical filehandle
read line
s until you
find the new name
, then
copy
the file to the new name
close
your lexical filehandle
}
In Section
Seekers of Perl Wisdom