batch file - Dos command xcopy to have current date - 90 days variable -


I need a .bat file, to copy it to xcopy files from a specific directory that are new to 90 days It means taking the date of today and spending 90 days and not copying.

thx

Use ROBOCOPY not XCOPY . This will do the work that you want very easily. Robocopy is installed on Windows 7 and is a free download for other versions.

  ROBOCOPY / S / MAXAGE: 90p: \ path \ to \ source Q: \ path \ to \ dest   

There are many other options, minimum Age, minimum and maximum size, attributes, filtering by file and directory names, and so forth.

In addition to this, you just tell the option / l what this would have done, so that you have other options correct.

Comments