Skip to content

Instantly share code, notes, and snippets.

@ftp27
Created Jun 30, 2013
Embed
What would you like to do?
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