Unzip a specific subfolder in an archive with the 7-Zip command line version
By Mia Morrison •
I want to unzip an ZIP archive, but just a subfolder in it.
Example structure archive.zip:
-rootfolder
--subfolder
---subsubfolderI just want to unzip subsubfolder with 7-Zip (preferably). How can I do it?
3 Answers
To unzip only the "doc" directory inside the ZIP file to "/tmp" directory, you need to specify the absolute path of "doc" directory inside ZIP file:
[bash]$ unzip test.zip "test/doc/*" -d /tmp/
$ 7z x archive.zip rootfolder/subfolderThe syntaxes of all commands in 7-Zip are similar. x stands for "eXtract with full paths".
Open the archive.zip with the 7-Zip file manager. Click and highlight the subfolder. Extract. I'm not sure how to use the command line interface for this behavior.