I always use utime after the file copy (to change the last modified time to
what the source file modify time was)..

And then Win32::Perms to find and set the perms and owner.

Steven

-----Original Message-----
From: Michael D. Schleif [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 18, 2002 2:16 PM
To: Perl-Win32-Users List Service
Subject: File::Copy to preserve file modifiction time ???



Using File::Copy to do
        copy(\\server1\path\file, \\server1\path\file);

Documentation says,

``Special behaviour if syscopy is defined (OS/2, VMS and Win32)

``If both arguments to copy are not file handles, then copy will perform
a ``system copy'' of the input file to a new output file, in order to
preserve file attributes, indexed file structure, etc. The buffer size
parameter is ignored. If either argument to copy is a handle to an
opened file, then data is copied using Perl operators, and no effort is
made to preserve file attributes or record structure.''

I expected that this means the same behaviour as typical win/dos copy
and *nix cp -p behaviour, whereby file modification time remains
unchanged.  It does not behave that way.

How can I achieve that behaviour, whereby file modification time is
identical on both copies?

-- 

Best Regards,

mds
mds resource
888.250.3987

Dare to fix things before they break . . .

Our capacity for understanding is inversely proportional to how much we
think we know.  The more I know, the more I know I don't know . . .
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to