开发者

Dos command xcopy to have current date - 90 days variable

i need to a .bat file to copy with xcopy command the files from a specific directory that are 90 days new. that means to take the todays date and take out 90 days of it and do not perform the copy.

开发者_StackOverflow

help is needed,

thx


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

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

There are many other options, for minimum age, min and max size, attrributes, filtering by file and directory names, and so forth.

Also you can use the /L option to just list what it would have done, to check you have the other options right.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜