Are there any free command line based zip utility?

5,695

Solution 1

For the record, '-v' option in 7-zip command line is used for creating volumes.
Here is a short description on Creating Multi-volume Archives with 7-zip.

Can you please explain what you mean by
"7Zip is disqualified, the -v parameter is not implemented yet"?

Solution 2

Most of the GNU command-line utilities are ported to windows, including zip:

http://gnuwin32.sourceforge.net/packages/zip.htm

For multi-volumes you must post-process the archive with zipsplit (included in same package).

Solution 3

Well for linux you can tar and gz zip folders via command line, but i'm going to assume your on windows?

Solution 4

You can pipe the output of any compressor that supports writing to stdout, such as tar with either its gzip or bzip2 options, through the relatively standard split command. This will compress and split the result without having an intermediate (unsplit) archive file

You can unpack the result by cating the files together and piping that through to the decompresser.

This will output all the files in one go (or use all the files in one go for the decompression step) - so if you are looking for something that supports prompting you to put in the next floppy/cd/dvd/... disk in at each step this is no good to you.

There are many ports of these utilities available for Windows environments.

Solution 5

Zipgenius allows command line options. So you can extract and compress archives from command line.

Share:
5,695

Related videos on Youtube

Magnus
Author by

Magnus

Updated on September 17, 2022

Comments

  • Magnus
    Magnus over 1 year

    I need to schedule a command line to zip contents of a couple of folders. Are there any free command line based utility that can handle multi volumes?

    (7Zip is disqualified, the -v parameter is not implemented yet)

    EDIT: 7Zip does indeed work with the -v parameter if used as described in the help file, and not according to the .exe's help output.

    EDIT2: On closer inspection, there is something strange going on, and here's the reason I got the "Not implemented" error message: (On a Windows 2008 Server x64 with U.S. locale):

    @ECHO OFF
    SET MYFILENAME=Backup-IIs-%date:~-4,4%-%date:~-10,2%-%date:~-7,2%.7z
    ECHO %MYFILENAME%
    "c:\program files\7-zip\7z" a "c:\backup\%MYFILENAME%" c:\inetpub\*.* -r -v49m
    

    Result: System Error: Not implemented.

    Changing it to (notice dot instead of dash in filename):

    @ECHO OFF
    SET MYFILENAME=Backup.IIs-%date:~-4,4%-%date:~-10,2%-%date:~-7,2%.7z
    ECHO %MYFILENAME%
    "c:\program files\7-zip\7z" a "c:\backup\%MYFILENAME%" c:\inetpub\*.* -r -v49m
    

    And 7Zip is happy.... Can someone explain?

    • nik
      nik over 14 years
      please describe your expectations from the '-v' parameter or link to details elsewhere.
    • Benjol
      Benjol over 14 years
      way back when, I used pkzip and pkunzip...
  • Magnus
    Magnus over 14 years
    Hmmm. it seems that it was the order of the command switches that confused 7zip. The .exe reports that it wants <commands> <switches> <archive_name>. But that doesn't work, It gives "not implemented". It should be <commands> <archive_name> <switches>
  • David Yates
    David Yates over 14 years
    for pedanticy - tar doesn't compress, it's an archiver; whereas bzip2 and gzip are the compression tools :) ..also - bzip2 almost always gets better compression, but tends to be much slower than gzip in my experience
  • David Spillett
    David Spillett over 14 years
    For extra pedanticy bzip2 performs transformation then compression rather than just compression (the BW transform [en.wikipedia.org/wiki/Burrows-Wheeler_transform] is both why it gets better compression rates than gzip and why it takes much longer to do so). You can make the tar==archive gzip/bzip2==compress distinction obvious by using an explicit pipe to/from gzip/bzip2 on the command line instead of tar's -z/-j options. Many incorrectly assume tar does the compression itself because with -z/-j they don't see the separate command (unless they check in ps/pstree while it is running).
  • sleske
    sleske over 14 years
    Just for the record: The zip utility in gnuwin32 is from Info-ZIP, not from GNU.
  • Admin
    Admin almost 2 years
    tar doesn't support zip archives