Solved

Zip file through command line

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

25 Experts available now in Live!

Get 1:1 Help Now