From c0981619bbfe5d3a3a8387212ae0cde1edec7fcd Mon Sep 17 00:00:00 2001 From: Audrey Aaliyah Jensen Date: Fri, 8 Sep 2023 11:08:13 -0500 Subject: [PATCH] drop extracted files into the email file's dir --- Sandbox Scripts/extract.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sandbox Scripts/extract.py b/Sandbox Scripts/extract.py index 94601b2..c302116 100644 --- a/Sandbox Scripts/extract.py +++ b/Sandbox Scripts/extract.py @@ -27,7 +27,8 @@ def extract(filename): """ # ensure that an output dir exists filepath = re.findall(OUTREGEX, filename) - od = (filepath[0] or "") + "/output" + od = (filepath[0] or "") + "/" + os.path.exists(od) or os.makedirs(od) output_count = 0 try: @@ -60,6 +61,7 @@ if __name__ == "__main__": path = "" if len(sys.argv) > 1: path = sys.argv[1] + print("Path: " + path) #Make sure there's a trailing slash pathRE = re.search(INREGEX, path) if pathRE is None: