Created
July 8, 2021 12:27
-
-
Save mahdi-malv/550d5167c8a821a8be692378748301f1 to your computer and use it in GitHub Desktop.
Remove build directories of IntelliJ projects with python3
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
python3 -c """ | |
import shutil | |
import glob | |
for i in glob.glob('**/build/',recursive=True): | |
print(f'Deleting {i}') | |
try: | |
shutil.rmtree(i) | |
except OSError: | |
print(f'Failed to remove {i}') | |
""" | |
# 1. For WINDOWS, replace `python3` with `python` or `py` | |
# 2. To remove directories other than `build` replace `/build` with that folder (such as node_modules) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment