I have the folowing lines as a part of a perl script, but the filecopy does not work... works fine when the command is performed i "dos" Tips anyone?
$cpfileto = "d:\\ftp\\images\\bilder\\image.jpg";
$cpfilefrom = "d:\\ftp\\images\\Cap_2665.JPG";
'copy $cpfilefrom $cpfileto';
LogMsg("copy /y $cpfilefrom $cpfileto");
sub LogMsg
{
my ($msg) = (@_);
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
printf("%02d/%02d/%02d %02d:%02d:%02d $msg\n", $year + 1900, $mon + 1, $mday, $hour, $min, $sec);
}
$cpfileto = "d:\\ftp\\images\\bilder\\image.jpg";
$cpfilefrom = "d:\\ftp\\images\\Cap_2665.JPG";
'copy $cpfilefrom $cpfileto';
LogMsg("copy /y $cpfilefrom $cpfileto");
sub LogMsg
{
my ($msg) = (@_);
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
printf("%02d/%02d/%02d %02d:%02d:%02d $msg\n", $year + 1900, $mon + 1, $mday, $hour, $min, $sec);
}