copy/xcopy always change modified attribute of file?

  • Thread starter Thread starter djc
  • Start date Start date
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.
 
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
 
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.
 
Back
Top