I want to create a batch file which should delete all subfolders of a folder which are older than 10 days, using Windows 7
Any help would be appreciated.
This question is related to
Adapted from this answer to a very similar question:
FORFILES /S /D -10 /C "cmd /c IF @isdir == TRUE rd /S /Q @path"
You should run this command from within your
d:\study folder. It will delete all subfolders which are older than 10 days.
/S /Q after the
rd makes it delete folders even if they are not empty, without prompting.
I suggest you put the above command into a .bat file, and save it as