2015-03-02, 02:01
Greetings all.. update on the zip opening problem..
I wrote the following script to take the existing zip file, extract it to a folder, then save that resulting folder as a zip file with out the container folder inside it:
for /R "D:\EMU\SNES\SNESROMS" %%I in ("*.zip") do ("C:\Program Files\7-Zip\7z.exe" e -y -o"%%~dpnI" "%%I")
for /d %%I in (*) do cd D:\EMU\SNES\ZIP\%%I && "c:\Program Files\7-Zip\7z.exe" a -tzip D:\EMU\SNES\ZIP\"%%I".zip *.smc
EDIT/Update:
Sucess! I now have zip files with the rom files in the 'root' ..
I got the following error when launching now:
19:23:42 T:20804 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IOError'>
Error Contents: (22, "invalid mode ('wb') or filename", 'V:\\Kodi\\portable_data\\userdata\\addon_data\\script.games.rom.collection.browser\\tmp\\extracted\\Alcahest/')
Traceback (most recent call last):
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\gui.py", line 404, in onClick
self.launchEmu()
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\gui.py", line 753, in launchEmu
launcher.launchEmu(self.gdb, self, gameId, self.config, self.Settings, selectedGame)
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 41, in launchEmu
cmd, precmd, postcmd, roms = buildCmd(filenameRows, romCollection, gameRow, escapeCmd, False)
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 204, in buildCmd
roms = handleCompressedFile(filext, rom, romCollection, emuParams)
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 385, in handleCompressedFile
fo = open(str(newPath), 'wb')
IOError: (22, "invalid mode ('wb') or filename", 'V:\\Kodi\\portable_data\\userdata\\addon_data\\script.games.rom.collection.browser\\tmp\\extracted\\Alcahest/')
-->End of Python script error report<--
I wrote the following script to take the existing zip file, extract it to a folder, then save that resulting folder as a zip file with out the container folder inside it:
for /R "D:\EMU\SNES\SNESROMS" %%I in ("*.zip") do ("C:\Program Files\7-Zip\7z.exe" e -y -o"%%~dpnI" "%%I")
for /d %%I in (*) do cd D:\EMU\SNES\ZIP\%%I && "c:\Program Files\7-Zip\7z.exe" a -tzip D:\EMU\SNES\ZIP\"%%I".zip *.smc
EDIT/Update:
Sucess! I now have zip files with the rom files in the 'root' ..
I got the following error when launching now:
19:23:42 T:20804 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IOError'>
Error Contents: (22, "invalid mode ('wb') or filename", 'V:\\Kodi\\portable_data\\userdata\\addon_data\\script.games.rom.collection.browser\\tmp\\extracted\\Alcahest/')
Traceback (most recent call last):
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\gui.py", line 404, in onClick
self.launchEmu()
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\gui.py", line 753, in launchEmu
launcher.launchEmu(self.gdb, self, gameId, self.config, self.Settings, selectedGame)
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 41, in launchEmu
cmd, precmd, postcmd, roms = buildCmd(filenameRows, romCollection, gameRow, escapeCmd, False)
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 204, in buildCmd
roms = handleCompressedFile(filext, rom, romCollection, emuParams)
File "V:\Kodi\portable_data\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 385, in handleCompressedFile
fo = open(str(newPath), 'wb')
IOError: (22, "invalid mode ('wb') or filename", 'V:\\Kodi\\portable_data\\userdata\\addon_data\\script.games.rom.collection.browser\\tmp\\extracted\\Alcahest/')
-->End of Python script error report<--