Skip to content

Instantly share code, notes, and snippets.

@domenu
Created December 18, 2018 14:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domenu/246374c61f137a7e78865aefdac82b0b to your computer and use it in GitHub Desktop.
Save domenu/246374c61f137a7e78865aefdac82b0b to your computer and use it in GitHub Desktop.
Remove all folders with a specific name recursively on Windows
To see which folders will be deleted:
FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d"
And then to actually delete them, just run this:
FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rd /q /s "%d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment