Solved

Zip file through command line

Posted on 2006-10-24
8
27,969 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 47

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

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…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now