-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempWiper.py
More file actions
34 lines (28 loc) · 1013 Bytes
/
tempWiper.py
File metadata and controls
34 lines (28 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
from glob import glob
def wipedir(curDir):
for subfolder in sorted(glob(curDir + '*/')):
wipedir(subfolder)
for fileName in os.listdir(curDir):
os.remove(curDir + fileName)
os.rmdir(curDir)
def seekanddestroy(curDir):
subfolderList = sorted(glob(curDir + '*/'))
if (curDir + '.vscode/') in glob(curDir + '.vscode/'):
wipedir(curDir + '.vscode/')
print('Found {}...'.format(curDir + '.vscode/'))
subfolderList = sorted(glob(curDir + '*/'))
for fileExecutable in sorted(glob(curDir + '*.exe')):
os.remove(fileExecutable)
print('Found {}...'.format(fileExecutable))
for fileOctal in sorted(glob(curDir + '*.o')):
os.remove(fileOctal)
print('Found {}...'.format(fileOctal))
for fileGmonOut in sorted(glob(curDir + 'gmon.out')):
os.remove(fileGmonOut)
print('Found {}...'.format(fileGmonOut))
for subfolder in subfolderList:
seekanddestroy(subfolder)
seekanddestroy('Vault/')
# command: find . -type f -name *.exe -delete
# g++ -std=c++11 -O2 -Wall test.cpp -o test.exe