使用 p7zip 提取受密码保护的 zip 文件的命令

发布于 2025-01-15 22:10:38 字数 667 浏览 3 评论 0原文

我正在使用一个开源 GitHub 项目 AndroidP7Zip ,它是 p7zip 支持 Android 项目的 zip、7zip 等压缩格式。

从 Android 端实现中,我们通过 JNI 将命令传递给 C++ 代码,就像提取一样,我们使用以下字符串作为提取、压缩命令:

String.format("7z x '%s' '-o%s' -aoa", archivePath, outPath); // extract


String.format("7z a -t%s '%s' '%s'", type, outPath, filePath) // Compress 

同样,我需要知道使用 p7zip 对文件执行以下操作的命令:

  1. 检查文件是否为密码保护?
  2. 提取密码延长文件
  3. 一次压缩多个文件
  4. 带密码的压缩命令。

尝试搜索但无法在任何地方找到 p7zip 所有可能命令的列表。

I'm using an open source GitHub project AndroidP7Zip which is an Android wrapper over p7zip to support zip, 7zip and other archive formats for Android project.

From android side implementation we pass the commands to the C++ code through JNI, like for extract we use following string as extract, compress command:

String.format("7z x '%s' '-o%s' -aoa", archivePath, outPath); // extract


String.format("7z a -t%s '%s' '%s'", type, outPath, filePath) // Compress 

Similarly, I need to know the commands for performing below actions on file using p7zip:

  1. Checking if a file is password protected?
  2. Extracting a password protracted file
  3. Compressing multiple files at a time
  4. Compress command with password.

Tried searching but couldn't find list of all the possible commands of p7zip anywhere.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文