iNTiGOD Posted May 28, 2015 Posted May 28, 2015 Howdy folks. Just thought I would share a quick tip if you ever wanted to convert any of your compressed roms in the zip format to 7z to save few extra megabytes. Copy the code below into a batch file (e.g. 7z.bat) for %%F in (*.zip) do ( "C:\Program Files\7-Zip\7z.exe" x -y -o"%%F_tmp" "%%F" * & pushd %%F_tmp & "C:\Program Files\7-Zip\7z.exe" a -y -r -t7z ..\"%%~nF".7z * & popd & rmdir /s /q "%%F_tmp" ) Then place the batch file within the directory full of your zip files and run it. This code will run 7zip and extract all files with the .zip extension within a particular directory, then compress them again in the .7z format. e.g. 1942.zip ---> 1942.7z hyperspin.zip ---> mariobros.7z iNTiGODsavedmespaceandsanity.zip ---> iNTiGODsavedmespaceandmysanity.7z Extra notes: + This does not delete your .zip files. + This code assumes you have 7-zip installed into your c:\program files\7-zip\ folder (you can change the code above to suite your needs) + Very rarely after recompressing a file the .7z extension is not added. e.g. 1942.zip gets extracted and recompressed into a 7z file as 1942 ----> simply add the .7z extension e.g. 1942.7z (double click the file and it should open in 7zip) Cheers MAME High Score Tutorial For HyperSpin
dnbcyan Posted May 28, 2015 Posted May 28, 2015 I use this one to compress folders. for /d %%X in (*) do "C:\Program Files (x86)\7-Zip\7z.exe" a "%%X.7z" "%%X\"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.