Last active
August 19, 2019 01:07
-
-
Save rougetimelord/07200e1bd8b11d5263628c89bbcd159d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from pathlib import Path | |
import os | |
root_dir = input("Dir: ") | |
for root, sub, file in os.walk(root_dir): | |
if "__MACOSX" in sub: | |
rm = os.path.join(root, "__MACOSX") | |
print("rming - " + rm) | |
os.rmdir(rm) | |
#pretty sure this isn't needed bc everything is in the _MACOSX folder but idk | |
#chdir(root_dir) | |
#for file in Path('.').glob('**/._*') + Path('.').glob('**/*.DS_Store'): | |
# os.remove(file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment