Solved To delete folders which are 24 months older

June 11, 2013 at 06:02:44
Specs: Windows Server 2003
Hello,

Can you please help me on below.

I just want to delete the folders from the path which are 24 month older. It has to done in Dos commands.

The below commad is used to delete the files but it is not working for folders.

forfiles /p C:\Users /s /d -730 /c "cmd /c del @file

Can someone look into this please..


See More: To delete folders which are 24 months older

Report •

#1
June 11, 2013 at 06:45:54
✔ Best Answer
The DOS del command doesn't work for folders. To delete a folder which contains files or sub-folders you need to use the deltree command.

http://www.computerhope.com/deltree...



Report •

#2
June 11, 2013 at 08:17:54
Don't run the script against the windows folder or you will toast the systems

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •
Related Solutions


Ask Question