Does anyone know how to unzip a highlighted list, so they unzip to folders of file name (under Windows)?

  • What OS? What archiving software do you have? – billc.cn Dec 4 '12 at 21:57
  • this ones for windows. – TardisGuy Dec 7 '12 at 4:57

unzip *

"unzip" starts a process that unzips, "*" is a glob that passes all file in the current diroctory to the process; hence, all files in the directory are unzipped by the process you start by this command.

It unzips to a folder with the zip's name as the folder name by default.

If you only want to unzip certain files, make the glob more specific; or use find with a regexp.


This doesn't work with a highlighted list, but in my answer at https://stackoverflow.com/a/18791568/116891 I have a batch script that will unzip all files in the current directory:

:: To actually include the path expansion character (tilde), I had to give valid numbers; see http://ss64.com/nt/rem.html for bug reference. Also, try call /? for more info.
@REM The %~n0 extracts the name sans extension to use as output folder. If you need full paths, use "%~dpn0". The -y forces overwriting by saying yes to everything. Or use -aoa to overwrite.
@REM Using `x` instead of `e` maintains dir structure (usually what we want)

@FOR /R %%a IN (*.zip) DO @(
    @if [%1] EQU [/y] (
        @7z x "%%a" -o"%%~dpna" -aoa
    ) else (
        @echo 7z x "%%a" -o"%%~dpna" -aoa

@echo USAGE: Use /y to actually do the extraction

If you want a gui to do the unzipping, you can try http://www.extractnow.com/ (as described somewhat at How can I recursively extract zip files on Windows including deletion?)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.