I would like to batch the "Extract Here…" command on a complete folder. Every type of archive should be unzipped into the current folder with the name of the archive file. I have found some BATCH scripts for just *.zip, but I don't care what kind of archive it is, as long as my archiver can open it.
Does anyone know what kind of archiver has such a batching funcionality? I can't seem to find it in 7-zip or winrar.
In pseudo:
Given folder x
foreach archiveFile in x or descendant of x
unzip archiveFile.extension >> "folder of archiveFile/archiveFile"
Update
I have tried the following for only zip files:
dir /s /b *.zip > allzips.txt
for /F %%x in (allzips.txt) do unzip %%x
Where unzip
is still an unknown function.
Best Answer
EDIT Given: Using batch script.
You may wish to use a third party zip tool (highly recommend 7-ZIP command line version called 7z.exe) to accomplish this.
with 7z, the syntax is as follows:
To extract the command would be:
the -y switch assume "Yes" answer to any questions that may come up during extraction such as overwrite requests.
So your command will read
If you want to output them into a different location, you can use the -o switch and specify the directory:
EDIT:
To perform the extract with full paths and specifying all ZIP archives only, use this:
Or even nutzier... all ZIP files on C: drive:
EDIT2:
Making it compatible with your output file, this: