From 7a9195ab0fac2a81ea957acfaa14e32e6b936b95 Mon Sep 17 00:00:00 2001 From: Gergely Hegedis Date: Mon, 29 Jan 2024 23:26:42 +0200 Subject: [PATCH] Update link_to_other_folder_files.py --- link_to_other_folder_files.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/link_to_other_folder_files.py b/link_to_other_folder_files.py index 39b34bf..043c147 100644 --- a/link_to_other_folder_files.py +++ b/link_to_other_folder_files.py @@ -16,7 +16,9 @@ def rename_files(directory): new_filename = new_filename.replace('\u00FA','u') new_filename = new_filename.replace('\u00FC','u') new_filename = new_filename.replace('\u0171','u') + # file specific cases (here example remove some prefix) new_filename = re.sub(r'^[0-9_.()\s]+','',new_filename) + old_path = os.path.join(directory, filename) new_path = os.path.join(directory, new_filename) os.rename(old_path, new_path)