-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclearer.py
More file actions
39 lines (32 loc) · 1.22 KB
/
clearer.py
File metadata and controls
39 lines (32 loc) · 1.22 KB
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
35
36
37
38
39
import os
import glob
# pretty much just removes everything from the folders, including ignoreMe.txt
def clear():
path = os.getcwd()
dts_input_path = path + "/DatavyuToSuperCoder/Input/"
os.chdir(dts_input_path)
dts_input_files = glob.glob(os.path.join(dts_input_path, "*"))
for file in dts_input_files:
os.remove(file)
dts_output_path = path + "/DatavyuToSuperCoder/Output/"
os.chdir(dts_output_path)
dts_output_files = glob.glob(os.path.join(dts_output_path, "*"))
for file in dts_output_files:
os.remove(file)
ft_path = path + "/combining/Input/"
os.chdir(ft_path)
ft_files = glob.glob(os.path.join(ft_path, "*"))
for file in ft_files:
os.remove(file)
output_path = path + "/OUTPUT/"
os.chdir(output_path)
output_files = glob.glob(os.path.join(output_path, "*"))
for file in output_files:
os.remove(file)
input_path = path + "/INPUT/"
os.chdir(input_path)
# only removes ignoreMe.txt from the INPUT folder (the .csv inputs stay)
input_ignore = glob.glob(os.path.join(input_path, "*txt"))
if input_ignore:
os.remove(input_ignore[0])
clear()