
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
|