问题
I have tried adding a new folder to an existing 7za archive using the following command from command prompt:
7za.exe a repo.zip \res\pub\newfolder newfolder
The above command added a folder to root of repo.zip. My intention was to add the new folder to location: \res\pub\folder inside repo.zip
Can anyone suggest or give me a correct command to add folder to a specific path of an archive?
Thanks, Pradeep
回答1:
Try to create a source location folder which you use for an update of your destination archive.
e.g.
7za.exe a "x:\destination_archive.7z" -up1q0r2x1y2z1w2 "c:\source_folder\*" -t7z -ms=off -mx1
I use this line of code every day to update a 7-zip archive. You need to adjust the '-u' parameter to your needs.
来源:https://stackoverflow.com/questions/16025334/is-there-a-way-to-add-a-folder-to-existing-7za-archive