M BUZZ CRAZE NEWS
// news

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
---subsubfolder

I 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/subfolder

The 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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy