Added name duplication prevention
This commit is contained in:
parent
74fe75eea0
commit
010c555e5a
1 changed files with 3 additions and 0 deletions
3
main.py
3
main.py
|
@ -82,6 +82,9 @@ def main():
|
|||
else:
|
||||
category: str = ""
|
||||
path: str = outputFolder + category + "/" + newname + extension
|
||||
if os.path.exists(path):
|
||||
newname = input("Name already in use, please choose another: ")
|
||||
path = outputFolder + category + "/" + newname + extension
|
||||
shutil.move(inputFolder + file, path)
|
||||
if args.reformat:
|
||||
if extension != ".mp4":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue