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

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

问题描述

在 Mac/Linux 上压缩/解压缩受密码保护的 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

然后提供秘密密码

注意:如果密码包含空格或特殊字符,则用单引号括起来

7z a secure.7z * -p"pa$$word @|"

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

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