Compare commits
No commits in common. "e016083f1ca3e2522ebe00702a224827e273f994" and "74fe75eea004859f26eed34ccd437bb63f28b631" have entirely different histories.
e016083f1c
...
74fe75eea0
1 changed files with 3 additions and 9 deletions
12
main.py
12
main.py
|
@ -70,24 +70,18 @@ def main():
|
||||||
extension: str = file.rpartition(".")[-1] or ""
|
extension: str = file.rpartition(".")[-1] or ""
|
||||||
if extension != "":
|
if extension != "":
|
||||||
extension = "." + extension
|
extension = "." + extension
|
||||||
newname = input("Enter new name: ")
|
newname = input("New name: ")
|
||||||
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("Enter category or delete to permanently delete file: ")
|
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)
|
||||||
else:
|
else:
|
||||||
category: str = ""
|
category: str = ""
|
||||||
path: str = outputFolder + category + "/" + newname + extension
|
path: str = outputFolder + category + "/" + newname + extension
|
||||||
if os.path.exists(path):
|
|
||||||
newname = input("Name already in use, please enter another name: ")
|
|
||||||
path = outputFolder + category + "/" + newname + extension
|
|
||||||
shutil.move(inputFolder + file, path)
|
shutil.move(inputFolder + file, path)
|
||||||
if args.reformat:
|
if args.reformat:
|
||||||
if extension != ".mp4":
|
if extension != ".mp4":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue