I have the following dos batch code that works fine for me as it is, but I need to wrap it in a loop that searches for the folder on all system drives and if it doesn't find the folder it exits:
cd \
echo
for /f "tokens=1,2 delims=:" %%A in ('dir /d MyOFFSetupFiles ^| findstr "\<Directory of\>"') do (
for /f "tokens=1-3 delims= " %%G in ("%%A") do (set "findPath=%%I:%%B" & set drvltr=%%I) )
echo drive is %drvltr%
echo folder path is %findpath%
pause
Any assistance would be greatly appreciated.
need help with wrapping a loop around the following code
Moderator: DosItHelp
Re: need help with wrapping a loop around the following code
Didn't you like the code that you got on another forum? 

Re: need help with wrapping a loop around the following code
foxidrive wrote:Didn't you like the code that you got on another forum?
Ditto
http://www.computerhope.com/forum/index ... 389.0.html
Re: need help with wrapping a loop around the following code
Folks;
I now have a working batch file so you can consider this post closed.
Thanks
I now have a working batch file so you can consider this post closed.
Thanks