Run TUFLOW From a Batch-file: Difference between revisions
Content deleted Content added
Steph.dufour (talk | contribs) |
Chris Huxley (talk | contribs) |
||
Line 198:
PING 1.1.1.1 -n 1 -w 60000 >NUL
goto do_while_loop_start
)
</pre>
Another way to achieve the same result using IF logic is shown below. This batch file will loop through the series of 14 simulations in groups of three.
<pre>
@ echo off
setlocal enabledelayedexpansion
Set %exe%="C:\TUFLOW\Releases\2012-05\w64\TUFLOW_iDP_w64.exe"
Set A=Q001 Q002 Q005 Q010 Q020 Q050 Q100
Set B=Exg Dev
Set P = 3
rem A=Event
rem B=Scenario
rem P=Number of models to run in parallel
set /A Counter=0
FOR %%a in (%A%) DO (
FOR %%b in (%B%) DO (
set /A Counter+=1
IF /i !Counter!==!P! (
Start "TUFLOW" /wait %exe% -b -e1 %%a -s1 %%b M11_5m_~e1~_~s1~_001.tcf
set /A Counter=0
) else (
Start "TUFLOW" %exe% -b -e1 %%a -s1 %%b M11_5m_~e1~_~s1~_001.tcf
)
)
)
</pre>
| |||