in reply to copying multiple files from a share
You need to do the same thing here. Two things to keep in mind: Perl-the-language doesn't have a command to copy multiple files; you need to use a glob or possibly use readdir and choose files yourlsef; and (as you are aware) you need to escape the backslash (or just use a forward slash instead).
Something like this should work, but is untested.
use File::Copy; my $to = 'd:/temp/logs/"; foreach my $from (glob '//amsepi01/logs$/*.gz') { copy($from, $to) or die "copy: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: copying multiple files from a share
by cmeena (Initiate) on Mar 10, 2005 at 16:36 UTC | |
by gaal (Parson) on Mar 10, 2005 at 17:19 UTC |