Skip to content

Instantly share code, notes, and snippets.

@Efreak
Created December 30, 2016 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Efreak/a136a0366d5f7ab3e30ce6c99ac7f42a to your computer and use it in GitHub Desktop.
Save Efreak/a136a0366d5f7ab3e30ce6c99ac7f42a to your computer and use it in GitHub Desktop.
@echo off
echo "Removing empty subdirectories"
timeout /t 10
cls
for /d /r %1 %%A in (.) do (
dir /a /b "%%~fA" 2>nul | findstr "^" >nul || rmdir "%%~fA"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment