Batch Script For Loop through Directories
For Loop through Directories
For looping through directories, /D
flag is used.
Example
An example of a for
loop for looping through directories at a given location.
for /D %y in (D:\documents\*) do @echo %y
note
This will go through subdirectories within the documents folder, if any exist.