-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# Created Date: Monday, June 17th 2024 | ||
# Author: Zihan | ||
# ----- | ||
# Last Modified: Monday, 17th June 2024 7:53:50 pm | ||
# Last Modified: Monday, 17th June 2024 7:59:27 pm | ||
# Modified By: the developer formerly known as Zihan at <[email protected]> | ||
# ----- | ||
# HISTORY: | ||
|
@@ -43,14 +43,14 @@ | |
# f.truncate() | ||
|
||
# substitute all space in file name with '_' | ||
# for file in md_files: | ||
# new_file = file.replace(' ', '_') | ||
# print(f'Renaming {file} to {new_file}') | ||
# os.rename(file, new_file) | ||
for file in md_files: | ||
new_file = file.replace(' ', '_') | ||
print(f'Renaming {file} to {new_file}') | ||
os.rename(file, new_file) | ||
|
||
# also for foler name | ||
folders = glob.glob('**/', recursive=True) | ||
for folder in folders: | ||
new_folder = folder.replace(' ', '_') | ||
print(f'Renaming {folder} to {new_folder}') | ||
os.rename(folder, new_folder) | ||
# folders = glob.glob('**/', recursive=True) | ||
# for folder in folders: | ||
# new_folder = folder.replace(' ', '_') | ||
# print(f'Renaming {folder} to {new_folder}') | ||
# os.rename(folder, new_folder) |