How do I unzip multiple files in the windows command prompt (using 7-zip)?

Unfortunately, Windows does not come stock with a way to unzip multiple files either in the file explorer or in the command prompt.

Luckily, 7-zip is an open-source tool that does this beautifully from the command prompt!


Get 7-zip for windows and install it. I installed the x64 version to C:\Program Files\7-zip, however, make note if you installed it to a different directory.

The command prompt

Let’s get these files unzipped!

  1. Open up a command prompt by typing “WindowsKey+R” and typing “cmd.” NOTE:If you get permission errors when extracting files, you likely need to run “cmd” as an administrator by right-clicking the program/shortcut to it and clicking “Run as Administrator”
  2. Type “cd C:\Program Files\7-zip” to get to the directory where you installed 7-zip (so you can run their 7z program from the command line). If you changed the install directory, be sure to change the second part of that command to the directory where it’s installed
  3. Type “for %f in (“C:\Path\*.zip”) do 7z x “%f” NOTE: Replace C:\Path with the directory where your many .zip files are stored.

Boom, that’s it! However, your files will all be unzipped to Program Files/7-Zip folder. If you want to change that, you can set the “-o” property when running the 7z command, or add the 7-zip folder to your windows “Path”.

Share this post


Tags: , , ,

Leave a Reply