Xcopy switch to overwrite older but not newer files?

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Is there an Xcopy switch for automatically overwriting older files while
automatically NOT overwriting newer files?

If I use xcopy /e /i
I get the results I want except that I don't want to be prompted on whether
or not to overwrite a file. If the file is older, I want to automatically
overwrite, but if same date or newer, I want to automatically not overwrite.

Jack
 
Jack said:
Is there an Xcopy switch for automatically overwriting older files while
automatically NOT overwriting newer files?

If I use xcopy /e /i
I get the results I want except that I don't want to be prompted on
whether or not to overwrite a file. If the file is older, I want to
automatically overwrite, but if same date or newer, I want to
automatically not overwrite.

The switches /d/y should do the trick.

Xlnt
 
In particular, note the part where it talks about not suppying a date after
the /D option.

|xcopy /?
|will list all the available switches
 
Back
Top