Is there a way to utilize Robocopy to target only files/folders that were modified within a certain time range? For example, if there is a file share with n-number of folders/files dating back several years, how would I target only the ones that were modified within the last one month or so and have the deltas copied over? I do not want it iterating throughout the entire share during the Robocopy process, but only targeting the recently changed files.
Asked
Active
Viewed 304 times
0
-
2What's wrong on the `/MAXAGE:n` parameter? (MAXimum file AGE - _exclude_ files _older than_ `n` days/date.) – JosefZ Oct 14 '19 at 16:14
-
But does it iterate through every file to find that age? – Helene Oct 14 '19 at 20:06
1 Answers
0
From the robocopy docs:
/MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
/MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
/MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
/MINLAD:n :: MINimum Last Access Date - exclude files used since n.
(If n < 1900 then n = n days, else n = YYYYMMDD date).
if you needed to get files that were accessed in the last month you would use:
robocopy <source_dir> <destination_dir> /MAXLAD:30 /S /Z /B
![](../../users/profiles/524385.webp)
Scott Heath
- 141
- 2