With the code below, I am trying to do a while loop inside a FOR loop. The while loop should be executed until the condition is met and then come back to the FOR loop.
It seems that although the code in the outer FOR loop is not executed, its counter goes further and when the condition is met the FOR loop is finished instantly.
What I would like to achieve is that the outer FOR loop is paused until the inner one is running and when the inner is finished/stopped then the FOR continues?
I will appreciate any hints.
This is the code:
FOR %%I IN (1 2 5 6 9 ) DO (
call some_bat_file rem this bat file return %chk% with value of 1 or 2
if !chk! EQU 2 start some_program
if !corechk! EQU 1 GOTO :BEGIN