Let's say you have a folder with 100 .zip files in it and each file has a folder structure that you'd like to preserve.

You can manually go through each file and extract the files, but you'll need to do it 100 times.  Wouldn't it be easier to do it once?

for /R "%CD%" %%I in ("*.zip") do (
  "C:\Program Files\7-Zip\7z.exe" x -y -o"%%~dpnI" "%%~fI" 
)

This command will take all 100 zip files in that directory and extract them while preserving the folder structure inside the zip file.

And it will work on .rar (change the .zip to .rar in the above example) files as well as almost any compressed file extension.

© 2023. All Rights Reserved.

Proudly published with Ghost