There are many ways to unzip archives on Unix:
The goal is to find all archives and uncompress them in their own directory (where each archive is found) on Windows.
Optional:
I am looking for a plain DOS command line, using, for instance, 7z.exe
(which is included in the portable version of PeaZip).
I took a command-line from this thread of the sevenzip project, with a small modification:
FOR /R %I IN (*src.zip) DO (C:\apps\peazip_portable-3.8.WINDOWS\res\7z\7z.exe x "%I" -aoa -o"%~dpI\*" |c:\windows\system32\find.exe "Everything is Ok" >nul &&DEL /F "%I" ||ECHO.%I : EXTRACT FAIL - ARC NOT DELETED >>ERR.TXT)
(multi-line for visibility)
FOR /R %I IN (*src.zip) DO ( \
C:\apps\peazip_portable-3.8.WINDOWS\res\7z\7z.exe x "%I" -aoa -o"%~dpI\*"
|c:\windows\system32\find.exe "Everything is Ok" >nul &&DEL /F "%I"
||ECHO.%I : EXTRACT FAIL - ARC NOT DELETED >>ERR.TXT)
Notes:
c:\windows\system32\find.exe
" instead of just FIND
, because I have other 'find.exe
' on my PATH
(from msysgit, or gow).&&DEL /F "%I"
' part if you want to keep the archives in place.I just unzipped 470 "src.zip
" from the Rational Team Concert SDK in two minutes with that one-liner!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With