forked from ChrisRackauckas/TBEEF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean.py
26 lines (24 loc) · 1.04 KB
/
clean.py
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
### Cleans the data folder out ###
### Takes an argument, 1 to delete PreProcess folder items ###
### Defaults to 0 ###
import os
import sys
WORK_PATH = os.getcwd()
try:
delPre = int(sys.argv[1]) == 1
except IndexError:
delPre = False
os.system("find Data/Effects ! -name README -type f -delete")
if delPre:
os.system("find Data/PreProcessed ! -name README -type f -delete")
os.system("find Data/ModelPredictions ! -name README -type f -delete")
os.system("find Data/ModelData/* -maxdepth 0 -name 'README' -prune -o -exec rm -rf '{}' ';'")
os.system("find Data/LogFiles ! -name README -type f -delete")
os.system("find Data/ModelSetup ! -name README -type f -delete")
os.system("rm *.Rout")
os.system("rm *.Rhistory")
os.system("find Data/HybridSetup ! -name README -type f -delete")
os.system("find Data/HybridPredictions ! -name README -type f -delete")
os.system("find Data/Output ! -name README -type f -delete")
os.system("find Data/SynthSetup ! -name README -type f -delete")
os.system("find Data/SynthPredictions ! -name README -type f -delete")