Error also occurs when the rename string is too long
This commit is contained in:
parent
af09a46f05
commit
4824f6e136
|
|
@ -14,7 +14,7 @@ def append_to_folder_name(folder_path, suffix):
|
|||
os.rename(folder_path, os.path.join(os.path.dirname(folder_path), new_folder_name))
|
||||
print(f"Folder renamed to: {new_folder_name}")
|
||||
except FileNotFoundError:
|
||||
print(f"Error: Folder '{folder_path}' not found.")
|
||||
print(f"Error: Unable to rename folder '{folder_path}'.")
|
||||
os.system("pause")
|
||||
|
||||
def get_subdirectories(folder_path):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user