@echo off
for /f "tokens=* delims=" %%i in ('dir /b /a:d') do (
rd "%%i" /s /q
)This nifty piece of code deletes all subdirectories - with any name - in any folder - including their contents.
It's what I ended up with.
As for the folder creation, that's solved as well - don't have the...
Terribly sorry for bumping such and old thread, but I'm at my wits end here.
Fitz, you may be my saviour in this.
I need *almost* the exact same thing, except the files in the root must be intact.
So far I've adapted your code thusly;
@echo off
dir /b /ad %1 > dirlist.txt
for /f %%i in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.