Changed the rename to check for ' [' instead of '['. That way if there is a [ symbol in the directory already, it won't skip it unless it is using the same 2 space prefix. Also it looks cleaner to have it spaced out. May change it to a different prefix later.
This commit is contained in:
parent
bd9f268f52
commit
d64ec57b69
|
|
@ -88,7 +88,7 @@ def main():
|
|||
if check_directory_exists(directory_name):
|
||||
print(f"Directory '{directory_name}' exists.")
|
||||
|
||||
#If folder was counted already, remove the old count. Ex: dirname[1] -> dirname
|
||||
#If folder was counted already, remove the old count. Ex: dirname_[1] -> dirname
|
||||
os.rename(directory_name, os.path.join(os.path.dirname(directory_name), directory_name_cleaned))
|
||||
directory_name = directory_name_cleaned
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user