You are not logged in.
Many thanks for a most useful resource. May I help to make it better by asking you to correct your entry for XCOPY?
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
This "newer than" feature is frequently used to update whole trees with new files.
Thanks
Ian
Offline
The page currently has this
/D:mm-dd-yyyy
Copy files that have changed since mm-dd-yyyy.
If no date is given, the default is to copy
files with a modification date before today.
(at least 1 day before)
What do you think is incorrect? the date format?
Offline
Well your text does differ from what I get when I do "xcopy /?" -- I get the same as Ian posted (Win2000, WinXP, Win2008) -- and they definitely seem to imply different behaviour.
Offline
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
I get this on win 7 Home Premium
Offline
In WinXP XCOPY /D doesnt work unless you use 2 digits for month and day i.e. 01-01-2010 rather than 1-1-10
So the standard help is a bit misleading there, unless this has changed in Vista/Win7 ?
Offline
OK I see the problem now, After some more testing, the microsoft help for this on Windows 7 and 2008 is wrong, the part: "If no date is given, copies only those files whose source time is newer than the destination time." is not behaviour I'm able to reproduce.
xcopy /D will always overwrite based on the modification date/time of the source file, no matter what the date or time of the destination file.
At first I thought maybe the help was supposed to read "If ONLY a date is given (no time), copies only those files whose source time is newer than the destination time." but there is no documented way to specify a time, and it doesnt follow that behaviour either.
By default i.e with no date specified, xcopy /D will copy files up to 47 Hours 59:59 Minutes old depending on the time of day you run the command.
I've changed the SS64 description to this:
/D:mm-dd-yyyy
Copy files that have changed since mm-dd-yyyy.
(files changed on or after the specified date)
If no date is given, the default is 1 day ago
(files changed on or after 00:01 yesterday.)It looks like this has been an issue for a while - this KB is from NT4 days, which has me wondering if this is a documentation error or a bug in XCOPY?
http://support.microsoft.com/kb/194918
Offline
I don't understand the confusion.
The KB is related to a UTC issue.
I have been using xcopy in production for a few years... the /D switch does exactly as stated in the microsoft documentation.
I do not see what the use of the stated function would be
" If no date is given, the default is to copy
files with a modification date before today.
(at least 1 day before)"
Offline