Created
April 7, 2021 01:44
-
-
Save 1pha/376f04f6979e17d47664435aa95847b0 to your computer and use it in GitHub Desktop.
Killing desktop.ini with python function. I'm sick of deleting these .ini files through Windows explorer and made this..
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
import os | |
def kill_desktop_ini(root_dir): | |
for (root, dirs, files) in os.walk(root_dir): | |
if len(files) > 0: | |
for file_name in files: | |
if file_name.endswith('.ini'): | |
os.remove(f'{root}/{file_name}') | |
if __name__ == "__main__": | |
kill_desktop_ini('../../mlruns/1') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment