for loop batch file

LotusGurL February 10, 2009 at 11:35:12
Specs: Windows XP
I wrote a batch file to call loop.bat which would go through all the subfolder to look for a specific text file (e.g. phys_*.txt). This is what I have for the for loop .bat file:
for /r %%f in ("*") do call loop.bat %%f

It run, but went through all the files instead of stopping at the folder to look for the file (e.g., c:\phys\234\gen.txt) I would like to have it go into the 234 folder to look for that gen.txt file not go into the gen.txt to look for the file. Hope I'm making sense. Thank you.

See More: for loop batch file

Report •

February 10, 2009 at 15:22:03
for /r c:\phys\234 %%f in (gen.txt) do call loop.bat %%f

Report •
Related Solutions

Ask Question