Skip to content

Instantly share code, notes, and snippets.

@podocarp
Created September 14, 2021 04:06
Show Gist options
  • Save podocarp/b085e558f4713578d5e83d603a93b376 to your computer and use it in GitHub Desktop.
Save podocarp/b085e558f4713578d5e83d603a93b376 to your computer and use it in GitHub Desktop.
Use 7z to extract zips in subfolders and place them in their own folders
@echo on
FOR /F "usebackq tokens=* delims=" %%A IN (`dir /b /s *.zip`) DO (
"c:\Program Files\7-Zip\7z.exe" x "%%A" -o"%%~pnA"
)
@podocarp
Copy link
Author

Copy the batch file to a directory containing your subdirectories. Execute. Extracted archives will be placed in a folder (bearing the same name minus extension) beside the original archive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment