Creating an encrypted store-only archive seems to be possible through the GUI variants that delegate to 7zip, but I can't figure out the proper command line call.

My failed attempts result in E_INVALIDARG:

7za a ~/Desktop/tmp.7z my-big-file -em=AES256 -pMyPass -m0=Copy

I've just had to deal with this myself, I didn't find the manual to be perfectly clear on how to use Method Parameters.

Encryption Type is a Method Parameter and needs to be passed as part of an -m switch, e.g.: -mem=AES256.

Similarly, if you want to do Copy Only (no compression), you need to use -mx=0.

7za a ~/Desktop/tmp.7z my-big-file -mem=AES256 -mx=0 -pMyPass
| improve this answer | |
  • And does this command (with the options after the filenames) actually work? – G-Man Says 'Reinstate Monica' Oct 31 '17 at 22:35
  • Works for me just fine on Windows, I imagine it would work in iOS/Unix. – Zac Faragher Oct 31 '17 at 22:49

I used 7z a -t7z -m0=Copy -mhe=on -pPassword archive.7z foldername to get around the E_INVALIDARG error.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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