Discussion:
xcopy/robocopy pdfs created yesterday and today only.
(too old to reply)
bizw0z
2010-06-25 12:02:02 UTC
Permalink
I have done research but I cant find how to make either xcopy or
robocopy, copy files with creation dates that are dynamic.

I have a folder that contains over a million pdfs.

At the moment, it backs up the entire folder, overwriting the existing
pdfs, but as you can imagine, this takes a long time and there is a
chance that what WAS a good pdf, with a bad copy. (but vice versa).

Anyone have any ideas on how I can run a batch file, that will look at
the creation date, and only copy ones created created today and
yesterday. I can then use scheduler to kick it off once an hour, to
keep the folders pretty well in synch.

Thanks in advance.

Bry
Pegasus [MVP]
2010-06-25 14:53:56 UTC
Permalink
Post by bizw0z
I have done research but I cant find how to make either xcopy or
robocopy, copy files with creation dates that are dynamic.
I have a folder that contains over a million pdfs.
At the moment, it backs up the entire folder, overwriting the existing
pdfs, but as you can imagine, this takes a long time and there is a
chance that what WAS a good pdf, with a bad copy. (but vice versa).
Anyone have any ideas on how I can run a batch file, that will look at
the creation date, and only copy ones created created today and
yesterday. I can then use scheduler to kick it off once an hour, to
keep the folders pretty well in synch.
Thanks in advance.
Bry
Here is the relevant extract from the robocopy manual:

::
:: File Selection Options :
::
/MAXAGE:n :: MAXimum file AGE - exclude files older than n
days/date.
/MINAGE:n :: MINimum file AGE - exclude files newer than n
days/date.

Loading...