copy/xcopy always change modified attribute of file?

D

djc

when using copy or xcopy and specifying to overwrite the file if it already
exists (/y option) should the modified date attribute of the destination
file always change to the current date/time? In other words, do these
commands do any kind of precopy comparing of the files and if they are the
exact same does the command NOT copy over the file? Thats looks like what is
happening to me while I'm testing something but I want to confirm.

any info is appreciated. Thanks.
 
M

Matthias Tacke

djc said:
when using copy or xcopy and specifying to overwrite the file if it already
exists (/y option) should the modified date attribute of the destination
file always change to the current date/time? In other words, do these
commands do any kind of precopy comparing of the files and if they are the
exact same does the command NOT copy over the file? Thats looks like what is
happening to me while I'm testing something but I want to confirm.

any info is appreciated. Thanks.
Look up (in alphabetical order):

copy /?
replace /?
xcopy /?

If you want better control over precopy actions have a look at
www.xxcopy.com

HTH
 
G

Gary Smith

djc said:
when using copy or xcopy and specifying to overwrite the file if it already
exists (/y option) should the modified date attribute of the destination
file always change to the current date/time?

The date and time should change to match that of the source file, not the
current date and time.
In other words, do these
commands do any kind of precopy comparing of the files and if they are the
exact same does the command NOT copy over the file? Thats looks like what is
happening to me while I'm testing something but I want to confirm.

Copy does not do any checking. Xcopy will check if you request that usinf
the /d option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top