Skip to content

Instantly share code, notes, and snippets.

@YPetremann
Last active September 21, 2016 20:52
Show Gist options
  • Save YPetremann/a7594fc75bec9095d7161603f73dc531 to your computer and use it in GitHub Desktop.
Save YPetremann/a7594fc75bec9095d7161603f73dc531 to your computer and use it in GitHub Desktop.
import os
import re
for subdir,dirs,files in os.walk("./"):
for file in files:
os.rename(file, re.sub("STEN([0-9]*)-(0*)([0-9]*)-srt","STEN\\1-\\3.srt",file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment