Skip to content

Instantly share code, notes, and snippets.

@ftp27
Created June 30, 2013 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftp27/5896465 to your computer and use it in GitHub Desktop.
Save ftp27/5896465 to your computer and use it in GitHub Desktop.
Rename roms
#!/usr/bin/python
import os
listRoms = os.listdir(".");
countRoms = len(listRoms);
for i in range(0, countRoms):
name = listRoms[i];
if (name[-4:] == ".bin"):
for j in range(len(name)):
if ((name[j] == "[") or (name[j] == "(")):
break;
os.rename(name,name[:j-1]+".bin");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment