Last active
October 23, 2023 08:13
-
-
Save ronsen/dbd9ec3092a517daf83305b769aa52f3 to your computer and use it in GitHub Desktop.
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
#!/bin/python | |
import os | |
USER_FONTS_DIR = "C:\\Users\\<USER>\\AppData\\Local\\Microsoft\\Windows\\Fonts\\" | |
WINDOWS_FONTS_DIR = "C:\\Windows\\Fonts\\" | |
def main(): | |
for i in os.listdir(USER_FONTS_DIR): | |
f = WINDOWS_FONTS_DIR + i | |
if os.path.exists(f): | |
try: | |
print("Deleting " + f + " ...") | |
os.remove(f) | |
except: | |
print("Unable to delete " + f) | |
else: | |
print("File not found") | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment