Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

SET MYFILENAME=Backup-IIs-%date:~-4,4%-%date:~-10,2%-%date:~-7,2%.7z
"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):

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

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

share|improve this question
please describe your expectations from the '-v' parameter or link to details elsewhere. – nik Sep 23 '09 at 5:26
way back when, I used pkzip and pkunzip... – Benjol Sep 23 '09 at 7:08
up vote 4 down vote accepted

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"?

share|improve this answer
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> – Magnus Sep 23 '09 at 8:48

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

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

share|improve this answer
Just for the record: The zip utility in gnuwin32 is from Info-ZIP, not from GNU. – sleske Jan 6 '10 at 18:41

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

share|improve this answer

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.

share|improve this answer
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 – warren Sep 23 '09 at 9:40
For extra pedanticy bzip2 performs transformation then compression rather than just compression (the BW 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). – David Spillett Sep 23 '09 at 10:49

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

share|improve this answer

After spending some time with the problem myself it turns out that having a .7z as part of your archive name will be the problem.

When creating volumes 7Zip will name them .001, .002, etc. and already naming your archive as .7z seems to cause it a bit of a headache.

It's a very poor error message, but a simple solution.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .