mirror of
https://github.com/JonasunderscoreJones/turbo-octo-potato.git
synced 2025-10-24 10:39:19 +02:00
found some more
This commit is contained in:
parent
0cf45bbd0c
commit
2bf3bb85dc
1 changed files with 19 additions and 0 deletions
19
remove_shit.py
Normal file
19
remove_shit.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import os
|
||||
|
||||
# Define the folder where you want to remove "-min" from filenames
|
||||
folder_path = "."
|
||||
|
||||
# Iterate through all files in the folder
|
||||
for filename in os.listdir(folder_path):
|
||||
if "-min" in filename:
|
||||
# Generate the new filename by removing "-min"
|
||||
new_filename = filename.replace("-min", "")
|
||||
|
||||
# Create the full path to the old and new files
|
||||
old_file_path = os.path.join(folder_path, filename)
|
||||
new_file_path = os.path.join(folder_path, new_filename)
|
||||
|
||||
# Rename the file
|
||||
os.rename(old_file_path, new_file_path)
|
||||
|
||||
print("File renaming complete.")
|
||||
Loading…
Add table
Add a link
Reference in a new issue