3

I want to unzip an ZIP archive, but just a subfolder in it.

Example structure archive.zip:

-rootfolder
--subfolder
---subsubfolder

I just want to unzip subsubfolder with 7-Zip (preferably). How can I do it?

3 Answers 3

1

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/

1
$ 7z x archive.zip rootfolder/subfolder

The syntaxes of all commands in 7-Zip are similar. x stands for "eXtract with full paths".

-1

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.

You must log in to answer this question.