Thursday 16 December 2010

Delete files older than a number of days

 If you want to delete all the files in D:\temp which are older than 30 days old then just run the following command:

forfiles /p "D:\temp" /S /M * /D -30 /C "cmd /c del /Q @path"

No comments:

Post a Comment