Suppose I already have an existing zip file Unprotected.zip. I want to add password protection to Unprotected.zip. I want to use 7-zip command-line version to accomplish this task. How should the 7-zip command lines look like to achieve this goal?
I think there is no one-step solution to do this. We have to extract the zip file, and then pack it to zip file. For example:
7z e Unprotected.zip
7z a Protected.zip -pPASSWORD UNPROTECTEDFILENAME
Replace the capital letters into your own string.
Refer to Add Set-Password
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With