views:

37

answers:

1

I need to write a batch file to unzip files to their current folder from a given root folder.

Folder 0
    |----- Folder 1
    |          |----- File1.zip
    |          |----- File2.zip
    |          |----- File3.zip
    |
    |----- Folder 2
    |          |----- File4.zip
    |       
    |----- Folder 3
               |----- File5.zip
               |----- FileN.zip

So, I wish that my batch file is launched like so:

ocd.bat /d="Folder 0"

Then, make it iterate from within the batch file through all of the subfolders to unzip the files exactly where the .zip files are located.

So here's my question:

Does the Windows (from XP at least) have a command line for its embedded zip tool? Otherwise, shall I stick to another third-party util?

+2  A: 

AFAIK, there is not unzip tool shipped as part of Windows XP, but there is gnu unzip which will do the job nicely for you.

mdma
I've been told that there was this compression util embedded to Windows XP that is called `compress.exe`.
Will Marcouiller
Compress doesn't know how to do anything with ZIP files, and is not available in all versions of XP. If you need unzip functionality, you will need a 3rd party EXE.
Joe
I have finally decided to use `7za.exe` which is the command line version of 7-Zip.
Will Marcouiller