Newbie help: copying files
Author Message
Newbie help: copying files

File::Copy seems only to work in the same directory.  I need to copy files
across drives:\directories in NT.  I can copy the original (add a .bak
extension), rename the original to a different drive:\directory, and rename
the .bak file back to the orginal.  Perl must have a more direct method.

JH

Wed, 18 Jun 1902 08:00:00 GMT
Newbie help: copying files
I don't know a more direct method than this, seems pretty straightforward to
me... You haven't forgotten to use \\ have you? Tsk tsk...

Try the following example, you should, of course, modify the filenames and
path and drive:

use File::Copy;

copy ("c:\\temp\\blah.pl", "d:\\perl\\blah2.txt");

Regards,

hal9000

Quote:

> File::Copy seems only to work in the same directory.  I need to copy >

files across drives:\directories in NT.  I can copy the original (add a >
.bak extension), rename the original to a different drive:\directory
Quote:
> and rename the .bak file back to the orginal.  Perl must have a more >
direct method.

>JH

Wed, 18 Jun 1902 08:00:00 GMT

 Page 1 of 1 [ 2 post ]

Relevant Pages