Are there any free command line based zip utility?
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 cat
ing 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.
Related videos on Youtube
Magnus
Updated on September 17, 2022Comments
-
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 over 14 yearsplease describe your expectations from the '
-v
' parameter or link to details elsewhere. -
Benjol over 14 yearsway back when, I used pkzip and pkunzip...
-
-
Magnus over 14 yearsHmmm. 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 over 14 yearsfor pedanticy -
tar
doesn't compress, it's an archiver; whereasbzip2
andgzip
are the compression tools :) ..also -bzip2
almost always gets better compression, but tends to be much slower thangzip
in my experience -
David Spillett over 14 yearsFor 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 over 14 yearsJust for the record: The zip utility in gnuwin32 is from Info-ZIP, not from GNU.
-
Admin almost 2 yearstar doesn't support zip archives