clarified input prompts

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

View file

@ -70,12 +70,12 @@ def main():
extension: str = file.rpartition(".")[-1] or "" extension: str = file.rpartition(".")[-1] or ""
if extension != "": if extension != "":
extension = "." + extension extension = "." + extension
newname = input("New name: ") newname = input("Enter new name: ")
else: else:
newname = file newname = file
if args.classify: if args.classify:
print(f"Existing categories: {os.listdir(outputFolder)}") print(f"Existing categories: {os.listdir(outputFolder)}")
category: str = input("Category: ") category: str = input("Enter category or delete to permanently delete file: ")
if category == "delete": if category == "delete":
os.remove(inputFolder + file) os.remove(inputFolder + file)
elif not os.path.exists(outputFolder + category) or not os.path.isdir( elif not os.path.exists(outputFolder + category) or not os.path.isdir(
@ -86,7 +86,7 @@ def main():
category: str = "" category: str = ""
path: str = outputFolder + category + "/" + newname + extension path: str = outputFolder + category + "/" + newname + extension
if os.path.exists(path): if os.path.exists(path):
newname = input("Name already in use, please choose another: ") newname = input("Name already in use, please enter another name: ")
path = outputFolder + category + "/" + newname + extension path = outputFolder + category + "/" + newname + extension
shutil.move(inputFolder + file, path) shutil.move(inputFolder + file, path)
if args.reformat: if args.reformat: