Solved Deleting 1 day older folders

September 11, 2012 at 18:07:26
Specs: Windows XP
I have to keep only today folder and need to remove older folders.
Folder Name /format - 2012-09-10 , yyyy-mm-dd

Ex: I have folders named 2012-09-11,2012-09-09,2012-09-08,2012-09-07 etc.

I need to keep only today 2012-09-11 and need to remove all

See More: Deleting 1 day older folders

Report •

September 11, 2012 at 18:19:15
✔ Best Answer
@for /f "skip=1" %%a in ('dir /b /o:-d') do echo del %%a
::===== end
I left safety "on", for obvious reasons. also, not tested.

Report •
Related Solutions

Ask Question