Created
June 30, 2013 19:15
-
-
Save ftp27/5896465 to your computer and use it in GitHub Desktop.
Rename roms
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/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