added option to delete files
This commit is contained in:
parent
010c555e5a
commit
33ea029c37
1 changed files with 4 additions and 1 deletions
5
main.py
5
main.py
|
@ -74,8 +74,11 @@ def main():
|
||||||
else:
|
else:
|
||||||
newname = file
|
newname = file
|
||||||
if args.classify:
|
if args.classify:
|
||||||
|
print(f"Existing categories: {os.listdir(outputFolder)}")
|
||||||
category: str = input("Category: ")
|
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
|
outputFolder + category
|
||||||
):
|
):
|
||||||
os.mkdir(outputFolder + category)
|
os.mkdir(outputFolder + category)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue