Last active
January 17, 2024 15:20
-
-
Save se7enack/d5b75704726c0696c013ac26ae96b271 to your computer and use it in GitHub Desktop.
Torrent Episode Renaming Tool
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
string2remove = ".720p.IBCTV.WEBRip.x264-GalaxyGlue" | |
edir = "/Users/user/Desktop/SomeGoodShowS01" | |
#edir = os.getcwd() | |
# Will reaname all files in the 'edir' by removing the above 'string2remove'. | |
# Example: | |
# Some.Good.Show.S01E##.720p.IBCTV.WEBRip.x264-GalaxyGlue.mp4 --> Some.Good.Show.S01E##.mp4 | |
files = os.listdir(edir) | |
for file in files: | |
old_name = file | |
new_name = file.replace(string2remove, "") | |
os.rename(old_name, new_name) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment