Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Cannot copy files from linux shared to windows

by bbb (Novice)
on Nov 05, 2014 at 08:39 UTC ( [id://1106163]=note: print w/replies, xml ) Need Help??


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

It says Copy failed: at copyfile.pl line 24

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

Replies are listed 'Best First'.
Re^3: Cannot copy files from linux shared to windows
by Anonymous Monk on Nov 05, 2014 at 08:49 UTC

    It says Copy failed: at copyfile.pl line 24

    That's not good enough :)

    What is line 24?

    Is it the call to File::Copy::copy()

    or to  'cp -r ($File::Find::name, $target)'

    backticks do not communicate errors via $!

    You might try dying via sub Fudge for File::Copy::copy and Capture::Tiny for "cp.exe"

      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."

        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 $!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106163]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2024-04-23 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found