问题描述
我尝试在命令提示符下使用以下命令将新文件夹添加到现有的 7za 存档:
I have tried adding a new folder to an existing 7za archive using the following command from command prompt:
7za.exe a repo.zip
espub
ewfolder newfolder
上面的命令添加了一个文件夹到 repo.zip 的根目录.我的目的是将新文件夹添加到 location: espubfolder inside repo.zip
The above command added a folder to root of repo.zip. My intention was to add the new folder to location: espubfolder inside repo.zip
谁能建议或给我一个正确的命令来将文件夹添加到存档的特定路径?
Can anyone suggest or give me a correct command to add folder to a specific path of an archive?
谢谢,普拉迪普
推荐答案
尝试创建用于更新目标存档的源位置文件夹.
Try to create a source location folder which you use for an update of your destination archive.
例如
7za.exe a "x:destination_archive.7z" -up1q0r2x1y2z1w2 "c:source_folder*" -t7z -ms=off -mx1
7za.exe a "x:destination_archive.7z" -up1q0r2x1y2z1w2 "c:source_folder*" -t7z -ms=off -mx1
我每天都使用这行代码来更新 7-zip 存档.您需要根据需要调整-u"参数.
I use this line of code every day to update a 7-zip archive. You need to adjust the '-u' parameter to your needs.
这篇关于有没有办法将文件夹添加到现有的 7za 存档中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!