I think your looking for something like this:
For /l %%b in (1,1,3) do (
For /l %%a in (1,1,5) do (
Start file1.exe
Echo %%a >log1.log
)
Start file2.exe
Exho %%b >log2.log
)
Check the switches for start.
Sorry this doesn't work.
I tested it with notepad.exe and calc.exe
And when I started script it has opened 15 notepads and 3 calcs.
But it should open only one notepad when I start a script
and second time when I start a script also just one notepad
and third time also
and fourth time also
and fifth time it should not open notepad.exe but calc.exe
and sixth time it should opend notepad.exe
and seveth also notepad.exe
and so on until 10th time
than it should open calc.exe instead notepad.exe
and 11th time should open notepad.exe
and 12th time should also opened notepad.exe
and 13th time also notepad.exe
until 15th time than it should not opened notepad.exe but calc.exe
and than when I start script nothing happend until I delete one or both txt file
than it should start all over again.