Solved

Zip file through command line

Posted on 2006-10-24
8
27,990 Views
Last Modified: 2011-08-18
Hi,

I have winzip 7 and winrar. Is there a way to zip a file using the command line? cmd?

i know it is possible through winzip 10.. but i was hoping there would be a free tool that can do it? or hperhaps a addon?
0
Comment
Question by:tikelz10
8 Comments
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 25 total points
ID: 17801084
free tool - download www.info-zip.org
0
 
LVL 48

Assisted Solution

by:dbrunton
dbrunton earned 25 total points
ID: 17801342
http://www.memecode.com/docs/winzip.html

http://www.winzip.com/prodpagecl.htm

The second one might be the one you are looking for.
0
 
LVL 14

Expert Comment

by:FriarTuk
ID: 17848695
if you have winrar, it should come with the dos cmds rar.exe (rar.txt) & unrar.exe (unrar /?)
0
 
LVL 4

Expert Comment

by:mctigue
ID: 17889387
try the zip command!  maybe it is only on my computer or something, but in the cmd prompt I typed zip /? and there it was!
0
 
LVL 4

Expert Comment

by:Caudax
ID: 17910980
http://www.7-zip.org/download.html

If all you want is a commandline tool, just download the commandline version and use that, I say. I personally prefer 7-zip over WinZip and WinRar, having used all three of them, so I downloaded the complete package.

7za.exe's help output:

7-Zip (A) 4.42  Copyright (c) 1999-2006 Igor Pavlov  2006-05-14

Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]

<Commands>
  a: Add files to archive
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
<Switches>
  -ai[r[-|0]]{@listfile|!wildcard}: Include archives
  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
  -bd: Disable percentage indicator
  -i[r[-|0]]{@listfile|!wildcard}: Include filenames
  -m{Parameters}: set compression Method
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  -scs{UTF-8 | WIN | DOS}: set charset for list files
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout
  -t{Type}: Set type of archive
  -v{Size}[b|k|m|g]: Create volumes
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
  -w[{path}]: assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
  -y: assume Yes on all queries

Now, if, however, you have a burning desire to be old-school and need to be totally retro in your zipping method, you can go ahead and use PKZIP and PKUNZIP with(out) style!

PKZIP.EXE: http://www.ibiblio.org/pub/packages/ccic/software/dos/utils/pkzip.exe
PKUNZIP.EXE: http://www.ibiblio.org/pub/packages/ccic/software/dos/utils/pkunzip.exe
MANUAL.TXT: http://www.uv.tietgen.dk/staff/mlha/Download/DOS/pkware/pkzip-2/manual.txt

For a simple guide to using PKZIP and PKUNZIP, please visit:
http://www.eurekais.com/brock/zipold/zipbasic.htm

Of course, if you do so please, you could also just go ahead and purchase "PKZIP for DOS" from PKWARE directly for the totally-affordable price of $47 and receive the 1999 edition (in either download *OR* diskette format) immediately!

If that's your cup of tea, go ahead and visit PKWARE's homepage:
http://www.pkware.com/home_and_small_office/products/dos/pkzip/
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question