Skip to content

Instantly share code, notes, and snippets.

@jk0
Created May 13, 2015 17:15
Show Gist options
  • Select an option

  • Save jk0/df3fdfc661f15ae36fda to your computer and use it in GitHub Desktop.

Select an option

Save jk0/df3fdfc661f15ae36fda to your computer and use it in GitHub Desktop.
import os
files = os.listdir(".")
for file in files:
if file != "rename.py":
title = file.split(".", 1)[0]
os.rename(file, "%s.mkv" % title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment