O
O
Optimus2014-06-08 14:21:05
Programming
Optimus, 2014-06-08 14:21:05

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

1 answer(s)
C
Cool Admin, 2014-06-08
Pyan @marrk2

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 question

Ask a Question

731 491 924 answers to any question