in reply to Move and rename files
my $dir_1 = '/some/dir'; my $dir_2 = '/other/dir'; opendir DIR, $dir_1 or die "Cannot open '$dir_1' $!"; while ( my $file = readdir DIR ) { rename "$dir_1/$file", "$dir_2/${file}_processed" or die "Cannot m +ove '$dir_1/$file' $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Move and rename files
by Chon-Ji (Novice) on Jun 29, 2006 at 03:16 UTC | |
by CountZero (Bishop) on Jun 29, 2006 at 06:13 UTC | |
by jwkrahn (Abbot) on Jun 29, 2006 at 04:08 UTC |