in reply to copy script
use File::Find; my $command="cp"; my $target="/home/kiruthika/Technical/NEW/"; #Here mention your direct +ory path to where you need to copy the files. my $str; find(\&wanted,(".","..",)); sub wanted() { if(/.*\.txt/)#find the .txt files and copy those into another loca +tion. { $str=$command." ".$_." " .$target; system("$str"); $str=" "; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: copy script
by marto (Cardinal) on Mar 25, 2010 at 11:56 UTC |