Revision 217a2aa5246c9a1c8b15a5009a167408a5db4446 authored by Charlie Hill on 31 July 2018, 00:42:39 UTC, committed by Charlie Hill on 31 July 2018, 00:42:39 UTC
1 parent d670e9b
Raw File
clean.py
#Run this script from the top-most directory of the tree you want to clean.
#python Version 2.7.2
import os

targets = ('log_', 'sensitivity.txt', 'opticalpower.txt', '~', '.pyc', '.ds_store', 'mappingspeedvary')

for root, dirs, files in os.walk(os.getcwd()):
    for file in files:
        if any(target in file.lower() for target in targets):
            print "Deleting file: " + file
            os.remove(os.path.join(root, file))
back to top