Created
February 28, 2017 10:52
-
-
Save koraysaritas/c0901d29f699ddd309b6730969f3ab8f to your computer and use it in GitHub Desktop.
Remove folders/files matching pattern recursively
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove folders matching pattern recursively | |
FOR /F "tokens=*" %G IN ('DIR /B /AD /S bin') DO RMDIR /S /Q "%G" | |
FOR /F "tokens=*" %G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%G" | |
FOR /F "tokens=*" %G IN ('DIR /B /AD /S .vs') DO RMDIR /S /Q "%G" | |
# Remove files matching pattern recursively | |
FOR /F "tokens=*" %G IN ('DIR /B /A /S *.log') DO DEL /F /S /Q /A "%G" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment