Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I have a script that runs some automatic zip generation using shell zip. The request is to add automatic encryption with password. From what I understand, the option -e is the right one, but it asks for the password by prompt; instead I need to make this step automatically, giving the password as an option or as a file.

In other words, if I write:

zip -e

Then a prompt asking the password two times is presented. Instead I want to do something like:

zip -e:thisisapassword

and have a zip file protected with password: thisisapassword

Does anyone any hints how to accomplish this?

share|improve this question
up vote 1 down vote accepted

Most forms of zip encryption do not support encryption with a command line password. Here is one form based on Igor Pavlov's 7-zip called jZip that might work -- have not tried it myself.

Option: -s[password]

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.