Question : Unzip zip files in folder and subfolders recursively

I have hundreds of zip files inside folders and subfolders with more zip files, they are tiny pascal and c# files from software projects.
They are really, really so much. Like 80-100 directories with 10-20 zip files each... I guess like 2000 to 3000 zip files.
I want to have all these files unzipped, and want to create a batch files that unzip these files into directories named with the zip files.
I already achieved to unzip a whole directory, but I couldn't make it to have the zip files into a directory with the same exact name as the file, I can't seem a way to extract the whole name from the zip file name.
So I need to help on that, and of course, for the recursive part.

My files look like this:

\2000\01\Proy1.zip
\2000\01\Proy2.zip
\2000\04\Proy1.zip
\2000\04\Proy2.zip
\2002\07\Proy1.zip
\2002\07\Proy2.zip
\2002\09\Proy1.zip
\2002\09\Proy2.zip
\2003\01\Proy1.zip
\2003\01\Proy2.zip

So, I want that on each of these directories, be created a directory named "Proy1" and "Proy2" (they are examples, not the real names, so I can't hardcode anything), and then each file to be unzipped into that directory.
I have winzip and winrar, I could use any of these if they do the job.
All files are zipped in .zip format.

Answer : Unzip zip files in folder and subfolders recursively

Glad to hear it worked.

In answer to your question, the %%A represents the file name from the FOR loop.  There are a set of modifiers that can be used when referencing the FOR loop variables (%%A in this case) to add some power to referencing them.  I am using 3 in combination, "d" returns the drive of the file, "p" returns the path to the file, and "n" is the base name of the file.  So basically everything but the extension.

You can see more info about these options by doing HELP FOR at the command prompt, I'm also attaching a cut of the section related to these variable modifiers.

A couple of other good online info sources are as follows too:

http://ss64.com/nt/
http://www.robvanderwoude.com/batchfiles.php

~bp
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
In addition, substitution of FOR variable references has been enhanced.
 
You can now use the following optional syntax:
 
    %~I         - expands %I removing any surrounding quotes (")
    %~fI        - expands %I to a fully qualified path name
    %~dI        - expands %I to a drive letter only
    %~pI        - expands %I to a path only
    %~nI        - expands %I to a file name only
    %~xI        - expands %I to a file extension only
    %~sI        - expanded path contains short names only
    %~aI        - expands %I to file attributes of file
    %~tI        - expands %I to date/time of file
    %~zI        - expands %I to size of file
    %~$PATH:I   - searches the directories listed in the PATH
                   environment variable and expands %I to the
                   fully qualified name of the first one found.
                   If the environment variable name is not
                   defined or the file is not found by the
                   search, then this modifier expands to the
                   empty string
 
The modifiers can be combined to get compound results: 
    %~dpI       - expands %I to a drive letter and path only
    %~nxI       - expands %I to a file name and extension only
    %~fsI       - expands %I to a full path name with short names only
    %~dp$PATH:I - searches the directories listed in the PATH
                   environment variable for %I and expands to the
                   drive letter and path of the first one found.
    %~ftzaI     - expands %I to a DIR like output line
Random Solutions  
 
programming4us programming4us