added option to delete files

This commit is contained in:
R Dittberner 2025-10-21 23:24:54 +02:00
parent 010c555e5a
commit 33ea029c37

View file

@ -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)