Commit f54e08c4 authored by renzo's avatar renzo

move script

parent 7b81f327
......@@ -72,6 +72,7 @@ paths = {}
for source in sources:
paths[source] = getattr(metadata, source)["output_path"]
delete = []
for path, dirnames, filenames in os.walk(root):
if path != root:
source_counter = 0
......@@ -86,9 +87,11 @@ for path, dirnames, filenames in os.walk(root):
optional_args["day"] = "today"
call = create_matlab_call(script_name, source, optional_args)
os.chdir(path)
# subprocess.run(call, shell=True)
subprocess.run(call, shell=True)
found = copy_mats(paths, path, filenames, templates[i])
if found:
source_counter += 1
if source_counter == 5:
shutil.rmtree(path)
\ No newline at end of file
delete.append(path)
print(path + ": " + str(source_counter))
print(delete)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment