Skip to content
Snippets Groups Projects
Commit 388cd961 authored by am0ebe's avatar am0ebe
Browse files

add path to tar command

parent 6dad7317
No related branches found
No related tags found
No related merge requests found
......@@ -51,8 +51,10 @@ PROJ = "ecotron"
# PROJ = "schrebatron"
TIME_FMT='%Y-%m-%d %H:%M:00'
startTime = dt.strptime('2020-07-07 00:00:00', TIME_FMT)
endTime = dt.strptime('2020-11-30 00:00:00', TIME_FMT)
# startTime = dt.strptime('2020-07-07 00:00:00', TIME_FMT)
# endTime = dt.strptime('2020-11-30 00:00:00', TIME_FMT)
startTime = dt.strptime('2020-08-11 00:00:00', TIME_FMT)
endTime = dt.strptime('2020-08-18 00:00:00', TIME_FMT)
# endTime = dt.strptime('2020-08-18 00:00:00', TIME_FMT)
noTime = dt.fromtimestamp(0)
......@@ -424,8 +426,9 @@ def xtract():
for root, dirs, files in os.walk(INPUTDIR): #walk recursively
for file in files:
if file.endswith(".tgz"):
file=INPUTDIR+file
print(f"xtracting {file}\n")
cmd_xtract=f"tar -zxvf {file}"
cmd_xtract=f"tar -zxvf {file} --directory {INPUTDIR}"
os.system(cmd_xtract)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment