Skip to content

Commit 619ea2a

Browse files
authored
chatgpt rename_files.py
1 parent 308ac40 commit 619ea2a

File tree

2 files changed

+73061
-0
lines changed

2 files changed

+73061
-0
lines changed

rename_files.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import os
2+
3+
folder_path = os.path.expanduser('~/Desktop/files')
4+
5+
for filename in os.listdir(folder_path):
6+
old_file_path = os.path.join(folder_path, filename)
7+
new_file_path = os.path.join(folder_path, filename.lower())
8+
9+
if old_file_path != new_file_path:
10+
os.rename(old_file_path, new_file_path)

0 commit comments

Comments
 (0)