Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking to use the command line 7-Zip to unzip a folder.

I have a file, say and want to unzip the contents of the file into a folder called example.

What are the commands I need to do this?

share|improve this question
up vote 31 down vote accepted

7z x -oduane

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]

  x: eXtract files with full paths
  -o{Directory}: set Output directory


7z x *.zip -o*

extracts all *.zip archives to subfolders with names of these archives.

Strangely, I had to go to the full help file to find this example; it isn't shown for 7z /?.

share|improve this answer
good lord, i'm an idiot. thanks much, appreciate the time to point out i should of paid more attention to the manual LOL, thanks again – duhaas Jan 14 '10 at 18:49
actually, that isnt creating a folder based on name of file: 7za x -o"J:\IMC11N E\Batch\LehmanPoint\Reports" "993002005" – duhaas Jan 14 '10 at 18:57
7z x extracts with full paths; if you want to extract to current directory (ignore path info in the archive) use 7z e. i find both handy at different times. – quack quixote Jan 14 '10 at 19:06
that worked, thanks again for taking the time to point that out: – duhaas Jan 14 '10 at 19:07
actually, it IS shown, if you type just 7z (minus the /?). – Molly7244 Jan 15 '10 at 2:54

The syntax would be: 7z x <path to>\ -oc:\duane

This will extract the content of the archive to the folder c:\duane with full paths.

Note: There is NO space between the switch -o and the destination folder. If that folder does not exist, it will be created automatically.

share|improve this answer

For p7zip:

7za e file.7z
share|improve this answer

Recursively extract a single file, or a selective set of files from an archive into the current folder:

7za.exe e art.archive -ir!*Art.jpg
share|improve this answer

You must log in to answer this question.

protected by studiohack Apr 27 '11 at 0:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .