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


/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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.