Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

How to copy file with preserving the file attributes

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


yamagk3 at gmail

May 26, 2008, 2:47 AM

Post #1 of 2 (627 views)
Permalink
How to copy file with preserving the file attributes

Hi, How do you copy a file with preserving the file attributes, like "cp -p"?
Seems that File::Copy does not support. I'd like to do it on the Windows
environment.

Thanks!
Kenji.
--
View this message in context: http://www.nabble.com/How-to-copy-file-with-preserving-the-file-attributes-tp17468851p17468851.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


aw at ice-sa

May 26, 2008, 3:07 AM

Post #2 of 2 (583 views)
Permalink
Re: How to copy file with preserving the file attributes [In reply to]

yamagk3 wrote:
> Hi, How do you copy a file with preserving the file attributes, like "cp -p"?
> Seems that File::Copy does not support. I'd like to do it on the Windows
> environment.
>

Hi.
That does not really sound like a mod_perl issue, more like a general
perl or perl-per-platform one.
Anyway, you might want to have a look at the various Win32:: modules, in
particular Win32::File.

A word of caution : if you are copying files where the source and/or
destination might be located on "network shares", you may need to be
extra careful in checking the result of your copying. The errors you
get sometimes do not necessarily reflect perfectly the real situation.
If you are "moving" a file for instance, you may want to explicitly
re-check if the target is really there and identical, before erasing the
source.

aw

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.