E
Eric
Greetings,
I am fairly new to Perl. I downloaded Perl 5.8.0 for NT/Win2000
platform.
I want to copy file from server1 to server2 using robocopy. In my perl
script:
$datenow = `date /T`;
($day,$mth,$yr) = split /\//, $datenow;
$src = "\\\\server1\\d1\\$yr\\$mth";
$dest = "\\\\server2\\d2\$yr\\$mth";
$swth = "\/r:1 \/w:5 \/MIR";
$comm = "robocopy $src\\$yr\\$mth $dest\\$yr\\$nth $swth";
print "system($comm)";
When I checks the system($comm) construct using print, it shows the
$comm string in multiple lines. For example:
system(robocopy \\server1\d1\2003
\09 \\server2\d2\2003
\09 /r:1 /w:5 /MIR)
Is there any way to get the $comm string into one line ? I believe
because it split into multiple line, robocopy gets the parameter wrong
and therefore won't work.
Did I miss something ? Can anyone help ?
Any pointer appreciated.
TIA
Eric
I am fairly new to Perl. I downloaded Perl 5.8.0 for NT/Win2000
platform.
I want to copy file from server1 to server2 using robocopy. In my perl
script:
$datenow = `date /T`;
($day,$mth,$yr) = split /\//, $datenow;
$src = "\\\\server1\\d1\\$yr\\$mth";
$dest = "\\\\server2\\d2\$yr\\$mth";
$swth = "\/r:1 \/w:5 \/MIR";
$comm = "robocopy $src\\$yr\\$mth $dest\\$yr\\$nth $swth";
print "system($comm)";
When I checks the system($comm) construct using print, it shows the
$comm string in multiple lines. For example:
system(robocopy \\server1\d1\2003
\09 \\server2\d2\2003
\09 /r:1 /w:5 /MIR)
Is there any way to get the $comm string into one line ? I believe
because it split into multiple line, robocopy gets the parameter wrong
and therefore won't work.
Did I miss something ? Can anyone help ?
Any pointer appreciated.
TIA
Eric