:: enable foll line to REMOVE safety
:: set echo=
:: ECHO ECHo ECho Echo echo...
if %echo% equ echo (echo safety is ON) else (echo CAUTION safety is OFF)
for %%a in (c d e) do (
echo scanning drive %%a:
for /f "tokens=*" %%z in ('dir /b /s /a:d %%a:abc') do %echo% rd /s /q %%z
NOT tested!, therefore:
safety is ON due to the nature of the beast. remove the "echo" if/when you feel brave and confident, which will then unleash the fury of RD /S /Q!!! Not done lightly.
"(c d e)" is just an example, replace with drive letters as appropriate to your needs.
If you want complete automation, maybe use fsutil or vbscript to enumerate drives and their types.