Batch convert archives to 7z format

  • LHammonds

    LHammonds - 2009-07-16

    Does anyone know of any existing utilities or scripts that can mass convert existing archives (RAR, ZIP, etc.) into 7z archives?  I have tons of .zip and .rar files and I'd like to convert them all to .7z since it compresses much better.  It is also nice that Windows does not list them like folders (as it does with ZIP files)

    It would also be nice if there was to right-click on an archive and convert it immediately as the files are added to my repository.

    So basically, I need a way to mass-convert all my current archives to 7z and if possible, have an easy way to convert new archives as they come in (guess it could be a shortcut to batch convert the download folder).  But ideally, it would be cool to multi-select several archives and choose "Z-Zip --> Convert --> 7z --> Ultra mode"


    • LHammonds

      LHammonds - 2009-07-20

      By "script", I mean anything such as DOS Batch, VB Script, KixTart, AutoIT, etc.


      • fernando

        fernando - 2009-07-21

        You need to work on your own script.
        Here is basic to get started...

        FOR %%I IN (*.RAR, *.ZIP) DO (
        7Z x "%%I" -oC:\.TMP\*
        7Z a "%%~nI" "C:\.TMP\%%~nI\*"
        IF %ERRORLEVEL% EQU 0 RD /S /Q C:\.TMP

  • Bighead

    Bighead - 2013-09-06

    If anyone stumbles on this page, I have made a batch script that does this. It will scan a folder for rar/zip files, recompress them into 7z, compare the file sizes, and keep the one that is smaller in size. It tells you how much space you save or preserve (in KB/MB) by converting or not converting to 7z. It also ouputs log files including a list of operations, all files that converted, files that stayed the same, or files that failed to extract/compress.

    It can also be configured to just mass convert into 7z if you only want 7z files, and place all processed files into sub directories to easily see which files got what action. It supports files up to 2GB in size by default, or can be configured to support files up to 20GB in size.

    Anyway, look for 7-Zip Convert-Compare-Delete Batch Script at the link below. It is near the bottom under "Other Fun Stuff". The included ReadMe should help with any questions you may have about the script.

  • Bighead

    Bighead - 2016-02-05

    Got an email from someone who stumbled on this and said the link was dead. Here's an updated link to the 7z recompression script.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks