Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to add a password to an existing zipfile with 7zip without going to all the trouble of unpacking it and re-packing it again?

share|improve this question
    
What platform (Linux, Windows, ...) are you using? –  whitequark Nov 25 '10 at 2:14
    
@Dennis: well, if you are writing this seriously, it's sad, and if not, it's not funny anyway. (And what if I'd say that regular 7zip executable won't run on Windows 3.11?) –  whitequark Nov 25 '10 at 3:07
    
I run windows 7 and ubuntu linux 10.10, depending on what needs doing. 7zip is cross platform though so what difference does that make? –  matt wilkie Nov 25 '10 at 16:33

4 Answers 4

up vote 1 down vote accepted

You can password-protect an existing ZIP file with zipcloak.

EDIT: T. Furukawa crafted a patch for zipcloak that adds a password option, so batch processing is much easier: C:\>for %f in (*.zip) do zipcloak -p password %f.

If you prefer a GUI, both WinRAR and PeaZip can batch encrypt existing archives.

  • In WinRAR: Select ZIP files > Tools > Convert archives > Compression... > Set password...

  • In PeaZip: Select ZIP files > Convert > Enter password / keyfile (optionally set algorithm to ZipCrypto under the Advanced tab for compatibility with Windows' built-in ZIP handling)

share|improve this answer

By nature if you want the file to be encrypted, it needs to be unpacked and repacked, since the whole archive needs to be encrypted with the password.

share|improve this answer
2  
That's the correct answer ;) - Even if a program gives you an option to add a password to a ZIP file in one single step it will internally repack all files. –  BlaM Nov 27 '10 at 15:27
1  
@BlaM thanks for the clarification. Though thinking about it more carefully, the "going to all the trouble" bit is really about avoiding my trouble, not the computer's. ;-) So I'd be okay with that option, which doesn't seem to available anyway. –  matt wilkie Nov 29 '10 at 0:20

No it isn't but regardless of the 'by nature' that is asinine. I will see if I can submit a patch for zip. That should be easy to do and 7zip should simply use temp space to unzip and repack the archive automatically when a password is added.

share|improve this answer
    
that would be much appreciated. :) –  matt wilkie Jun 9 '11 at 22:12

Would it work for you to zip the zip file? Use no/low compression and encrypt the original zip file. Its a lot quicker than repacking the original files.

share|improve this answer

Your Answer

 
discard

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.