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  
 
 [ 2 post ] 

 Relevant Pages 

1. Using File::Copy and Sockets to copy public files from http addresses

2. File::Copy, copying files problem.

3. Newbie File::Copy question

4. newbie trying to solve file copying problem

5. Newbie ques - how to copy files from URLs

6. Newbie question about File::Copy

7. newbie: copying files

8. Newbie can't copy 1 file to another

9. Warning using copy from File::Copy

10. Semantics of File::Copy::copy(,)

11. Help needed to copy files

12. File::Copy help needed

 

 
Powered by phpBB® Forum Software