Solved

Zip file through command line

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

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…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 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