Jump to content
(Open Beta) HyperSpin 2 is now available for everyone ×

Convert Zip files to 7z files


Recommended Posts

Posted

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    :alberteinstein:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...