Answer the question
In order to leave comments, you need to log in
Deleting empty folders in a folder
OS Windows 7. Tell me the code in C or another language so that it would then be saved as * .cmd to put in a folder and when it starts it would delete all empty folders in it.
Answer the question
In order to leave comments, you need to log in
for /d %%i in ("D:\1\*") do rd /q "%%i" 2>nul
*for depth 1
goto start
:fn1
for /d %%i in ("%~1\ *") do (call :fn1 "%%i" & rd /q "%%i")
exit /b
:start
call :fn1 "C:\folder"
*for unknown depth
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question