Does anyone know how to unzip a highlighted list, so they unzip to folders of file name (under Windows)?
2 Answers
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?)