From 33ea029c37a18c2e1313387e0830ea1ef85e2685 Mon Sep 17 00:00:00 2001 From: Roxi Dittberner Date: Tue, 21 Oct 2025 23:24:54 +0200 Subject: [PATCH] added option to delete files --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 626358d..f692179 100755 --- a/main.py +++ b/main.py @@ -74,8 +74,11 @@ def main(): else: newname = file if args.classify: + print(f"Existing categories: {os.listdir(outputFolder)}") category: str = input("Category: ") - if not os.path.exists(outputFolder + category) or not os.path.isdir( + if category == "delete": + os.remove(inputFolder + file) + elif not os.path.exists(outputFolder + category) or not os.path.isdir( outputFolder + category ): os.mkdir(outputFolder + category)