xcopy files older week

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to create batch job using xcopy that was created in the last 7
days.

Example:

xcopy c:\inc d:\inc\archive /d:date-7

How can I change the date-7 (files create within the last 7 days) to a
variable and use in the statement xcopy?

Please help me complete this task.
 
Go to http://www.xxcopy.com and download the program. Then, look at the
command references. Here's the switches relevant to what you want to do:

/DA#<n> Copies files that were changed on or after <n> days ago.
/DB#<n> Copies files that were changed on or before <n> days ago.
/Do#<n> Copies files that were changed on the day <n> days ago.

MD
 
Back
Top