You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote such a script in python. Searches for roms in the "ROMS" directory and the unpacked roms are placed in the "UNPACKED" directory.
import zipfile
import os
onlyfiles = [f for f in os.listdir("./ROMS")]
for f in onlyfiles:
with open("./ROMS/" + f, 'rb') as in_file:
with open(f+'.zip', 'wb') as out_file:
out_file.write(in_file.read()[59904:])
with zipfile.ZipFile(f+'.zip',"r") as zip_ref:
if not os.path.exists("./UNPACKED"):
os.makedirs("./UNPACKED")
zip_ref.extractall("./UNPACKED")
os.remove(f+'.zip')
Would it be possible to add a function to extract every rom file?
The text was updated successfully, but these errors were encountered: