From bb851fb3c1cb4859c411627e91762ad90a9b6ab2 Mon Sep 17 00:00:00 2001 From: Tristan Smith Date: Sun, 7 Apr 2024 22:44:57 -0400 Subject: [PATCH] this thing yells at you now. --- unzipdir.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unzipdir.py b/unzipdir.py index 09fa79e..a787d35 100644 --- a/unzipdir.py +++ b/unzipdir.py @@ -10,7 +10,9 @@ def unzip_files(directory_path): os.makedirs(output_dir, exist_ok=True) # Create the directory if it doesn't exist with zipfile.ZipFile(zip_file, 'r') as zip_ref: - zip_ref.extractall(output_dir) + for file in zip_ref.namelist(): + print(f"Extracing {file} to {output_dir}") + zip_ref.extract(file, output_dir) print(f"Extracted {zip_file.name} to {output_dir}") if __name__ == "__main__":