From 4824f6e13635a48b6e00e0d1f7116d6d37395528 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 26 May 2024 23:53:58 -0400 Subject: [PATCH] Error also occurs when the rename string is too long --- CountFolderFiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CountFolderFiles.py b/CountFolderFiles.py index 65f6539..193cbfb 100644 --- a/CountFolderFiles.py +++ b/CountFolderFiles.py @@ -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):