1.

Solve : Delete Directories by Date?

Answer»

Ok, I am trying to set up a back-up BATCH file...

XCOPY C:\tmp \\server\tmp /E /V /Y

No problem, right? Ok, but now I want to delete all folder with a modify date of 30 days or older from the back-up destination (target) before doing the xcopy...

RD /Q \\server\tmp
XCOPY C:\tmp \\server\tmp /E /V /Y

This deletes all directories in \\server\tmp. How do I limit it to deleting directories with modify dates < CURRENT date -30 days?



Discussion

No Comment Found