Thread

Posted on Wed Jun 15 21:05:48 2005 by learning
Having Trouble Copying Files
I'm trying to write a perl script to copy files from one server to two other servers. I installed the Win32-FileOp module along with its 3 dependent modules. I thought I would try something simple first like making a copy of an existing file on my desktop, but I just can't get anything to work. Could you please point me in the right direction? This is what I have.
#!perl use Win32::FileOp; $FileToCopy = "UploadTest30.wmv"; $FileName = "UploadTest30_1.wmv" Copy ($FileToCopy => $FileName) or die "Copy failed" $^E";
Direct Responses: 638 | Write a response
Posted on Mon Jun 20 15:18:50 2005 by jenda in response to 624
Re: Having Trouble Copying Files

Most probably the current working directory is not what you expect.

Try to add
use Cwd qw(getcwd); print "In folder: " . getcwd() . "\n";
on top of the script. Does it print the expected path?
Write a response