Knowledge.ToString()

Commands for Using Standalone 7-zip to Split and Combine Zip File

What is Standalone 7-zip?

It is a single executable that can be used to zip and unzip files without installing 7-zip on a machine.

How to Get Standalone 7-zip?

Visit the page https://www.7-zip.org/download.html and download “7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager”

Download 7-zip standalone version

Command to Create a Zip and Split it Based on a File Size?

"C:\EXE_LOCATION\7za.exe" a -v2m "Release4.zip" "*.xlsm"


EXE_LOCATION = Full path of 7za.exe on the computer
a = create archive(=zip)
-v2m = split the file into 2MB
“Release4.zip” = zip output file name
“*.xlsm” = source file name(s) to zip

Command to Extract Files From Splitted Zip Files?

Note: Even though you are specifying only the the first part in the command, the command will look for all the parts in the same folder and extract it.

"C:\EXE_LOCATION\7za.exe" e -o"C:\MY_FOLDER\" "C:\ZIP_FILE_LOCATION\Release4.zip.001"


EXE_LOCATION = Full path of 7za.exe on the computer
MY_FOLDER = Output folder where the unzipped files will reside
ZIP_FILE_LOCATION = Location of zip file to unzip
e = extract from zip file
-o = output directory
“C:\ZIP_FILE_LOCATION\Release4.zip.001” = first part of zip file

Share

Comments

7 responses to “Commands for Using Standalone 7-zip to Split and Combine Zip File”

  1. ittoshura Avatar
    ittoshura

    how to do the splitting and merging of the files in a Linux machine

  2. d h Avatar
    d h

    The title says “… and Combine Zip File” but there are no commands to combine files which have been split.
    The extract commands just extract the content from a single part of the zip-split, but not from the entire set of split archive files.

    1. Vishal Monpara Avatar
      Vishal Monpara

      Hello D H,

      In command, you need to mention only first part. As far as all the parts are in the same folder, 7-zip will extract everything.

      Regards,
      Vishal Monpara

      1. bhanu Avatar
        bhanu

        How to combine the split copies

        1. Vishal Monpara Avatar
          Vishal Monpara

          Hello Bhanu,

          The command will not combine the splitted file but instead it will extract all the files.

          1. Jeff the Good Samaritan Avatar
            Jeff the Good Samaritan

            Incorrect. The last piece of code combines all splitted files, back into one.

        2. Jeff the Good Samaritan Avatar
          Jeff the Good Samaritan

          The last piece code given above achieves this. It extracts all the pieces of the archive (-e) and pieces them back together with the original name, in the path specified (-o).

Leave a Reply

Your email address will not be published. Required fields are marked *