found some more

This commit is contained in:
Jonas_Jones 2023-09-03 15:58:17 +02:00
parent 0cf45bbd0c
commit 2bf3bb85dc

19
remove_shit.py Normal file
View 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.")