7-Zip命令在Windows上创建和解压缩受密码保护的ZIP文件? [英] 7-Zip command to create and extract a password-protected ZIP file on Windows?

查看:310
本文介绍了7-Zip命令在Windows上创建和解压缩受密码保护的ZIP文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac / Linux上压缩/解压缩受密码保护的zip文件,我使用:
Zip:

On Mac/Linux to zip/unzip password protected zip files, I use: Zip:

zip -P password -r encrypted.zip folderIWantToZip

解压缩:

unzip -P password encrypted.zip

在命令行上,Windows上的等效命令是什么(假设已经安装了7zip)?

What are the equivalent command on Windows on the command line (assuming that 7zip has been installed)?

我一直在做研究,发现不可能进行密码加密使用Java的zip4j库。此外Windows没有像Mac / Linux这样的zip命令提示符

I have been doing research and found that it is not possible to password encrypt using the Java zip4j library. Also Windows does not have a zip command prompt like Mac/Linux

推荐答案

http://www.dotnetperls.com

7z a secure.7z * -pSECRET

其中:

7z:      name and path of 7-Zip executable
a:        add to archive
secure.7z:    name of destination archive
*:    add all files from current directory to destination archive
-pSECRET: specify the password "SECRET"

打开

7z x secure.7z


$ b b

然后提供SECRET密码

then provide the SECRET passwd

这篇关于7-Zip命令在Windows上创建和解压缩受密码保护的ZIP文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆