0

Is there a way to robocopy using /MIR only those files from source, that are older X days then the files in destination?

Morignus
  • 23
  • 4

1 Answers1

0

/MINAGE:N should do the trick:

robocopy /?
[...]
/MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.

This will of course take into account the difference from the current date and time, and not of the destination file, but if you run this script daily the result should be the same.

Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
  • That exludes all files that are newer than n days/date - but I want to exclude files that are newer than n days/date according to those files in destination folder ... in another words "not copy files if date between source and destination is up to 5 days) sorry I'm not native speaker... – Morignus Jul 12 '17 at 12:52
  • Well, what you want is AFAIK not possible, this is the closest you'll get. – Gerald Schneider Jul 12 '17 at 12:55
  • @Morignus The `/XO` option could be of _some_ use maybe. **/XO :: eXclude Older files.** – Lenniey Jul 12 '17 at 13:53
  • i think this question needs more details, since only one part of the complete command is shown... – djdomi Oct 18 '21 at 08:19