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:
admin 2024-05-19 15:46:47 -04:00
parent bd9f268f52
commit d64ec57b69

View File

@ -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