in reply to Re^3: Cannot copy files from linux shared to windows
in thread [Solved] Cannot copy files from linux shared to windows

My bad, line 'cp -r ($File::Find::name, $target)' should not be included. I had updated the script without the "cp -r" line.

line 24 is "copy ($File::Find::name, $target) or die "Copy failed: $!";

The whole line I found in log file is "Copy failed: at copyfile.pl line 24 <$file> line 14."

  • Comment on Re^4: Cannot copy files from linux shared to windows

Replies are listed 'Best First'.
Re^5: Cannot copy files from linux shared to windows
by Anonymous Monk on Nov 06, 2014 at 01:15 UTC

    Yeah, that doesn't include a value for $! which is very weird .... which is why you should use Fudge() to get more info

    Also what version of perl do you have, and what filenames are involved?

    Do a Data::Dump::dd( $source, $target ) and post that

    Then try File::Copy::copy( ... ) or die Fudge(); where ... is copy/paste of ::dd output

    Then try getting/installing the latest http://perl5.git.perl.org/perl.git/history/HEAD:/lib/File/Copy.pm and try again

    File::Copy::copy shouldnt die without setting $!