in reply to Re^5: mv files from dir1 to dir2
in thread mv files from dir1 to dir2
I am only getting the subdir under "/home/mgavi/testdir1/RESULTS 2008".foreach my $dir(@subdirs){ opendir my $dh, "$topdir/$dir" or die "Error: $!"; my @files = readdir $dh; print "raw files = @files\n"; @files = grep /^(\d+)(.+)(LacZ|pgK|SD|SU)$/,@files; print "$dir -> @files\n"; foreach my $file(@files){ system( "mv $topdir/$dir/$file $newdir/$file"); } closedir $dh; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: mv files from dir1 to dir2
by zentara (Cardinal) on Jan 12, 2009 at 21:43 UTC |