#87 One-line batch script to delete empty directories:

Variant 1

for /f "delims=" %%i in ('dir /s /b /ad ^| sort /r') do rd "%%i">NUL

Variant 2

for /f &quot;usebackq&quot; %%d in (<code>&quot;dir /ad/b/s | sort /R&quot;</code>) do rd &quot;%%d&quot;

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading