ooops that shouldn't be there
This commit is contained in:
parent
a8b8b94298
commit
8e9a0f122c
4 changed files with 0 additions and 15 deletions
Binary file not shown.
Binary file not shown.
|
@ -1,15 +0,0 @@
|
|||
import os
|
||||
|
||||
def rename_files(root_dir, old_str, new_str):
|
||||
for dirpath, dirnames, filenames in os.walk(root_dir):
|
||||
for filename in filenames:
|
||||
if old_str in filename:
|
||||
old_file = os.path.join(dirpath, filename)
|
||||
new_file = os.path.join(dirpath, filename.replace(old_str, new_str))
|
||||
os.rename(old_file, new_file)
|
||||
print(f'Renamed: {old_file} to {new_file}')
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue