Solved

Zip file through command line

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
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…

785 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