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?
34 Answers
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.
5Would 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.
Yes, you can do it with 7-Zip, following below steps without doing any extract and repacking
- Right click files you want to add to zip
- 7-Zip -> Add to archive...
- New window opens with default name for new zip file.
- Next to that drop down box, there is a square button with three dots over it (Browse)
- Select existing zip file into which you want to add files
- Over already open window, Right-Bottom there is 'Encryption' block, with text boxes to input intended password, give inputs there
- Click OK
- Congrats
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)