Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to zip the files in XP using the windows default zip utility through command prompt?

share|improve this question

migrated from Aug 2 '10 at 12:06

This question came from our site for professional and enthusiast programmers.

The zipping feature is a function of the Explorer shell and not exposed any other way. – Joe Aug 2 '10 at 11:55
I believe that this question should be asked on SuperUser – DixonD Aug 2 '10 at 11:56

You can't use this tool from the command line in Windows XP.

The best solution would be the free open source tool 7zip, which is very good for creating zip files. I have used this from the command line in XP, and for writing batch files, and it's very good. A simple example:

7za a *.txt

(this adds all the text files in the current directory to an new archive called

There is also the Windows Server 2003 Resource Kit, which can be installed on XP and includes a command line compress, but you will not get such a good result with this (less reliable, worse compression, harder to use and less options)

Edit: Actually, I just found this question, which does have a (somewhat convoluted) way to do this. But they recommend 7zip too.

share|improve this answer

when i wanted to use zip a file thru command line in the past, i've used 7zip, which comes with a CLI. just add the folder to the PATH.

share|improve this answer

You must log in to answer this question.