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

Duplicate Questions

How to compress files with batch file?

Using compact.exe didn't do what I wanted. I'd like to have an archive file created so that the files can be retrieved. This is intended for backup purposes.

This question seems to be asked several times, but each time the response is to download a third-party command-line program (CLI) and add it to the path which will allow for command line access. However, this will not work due to the environment that I'm working in. Is there a way to compress a file and have the contents put in a backup archive file?

<command> -d /directory/to/compress ""
... //now contains all /directory/to/compress contents

As an alternative, is there a way in PowerShell to compress a file?

share|improve this question
@heavyd Thanks - found this link from that question. The accepted answer actually requires a cmdlet extension to be added.… I'm still looking to create a zip file directly from cmd prompt so that I don't have to enable execution policy for powershell. – Eric U. Jul 6 '10 at 17:48

You must log in to answer this question.

Browse other questions tagged .