Run TUFLOW From a Batch-file: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 451:
endlocal
</pre>
===Copy model, checks and results in a looped batch file===
This batch file uses the copy model function to copy the model (inputs and check files), of both scenarios 5m and 2.5m, to a specified folder location. After copying, <u>[https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy]</u> is used to copy the results, based off the tcf filename and specified scenarios, to the destination result folder.
<pre>
@echo off
set TUFLOWEXE_iSP=C:\Releases\2023-03-AF\TUFLOW_iSP_w64.exe
set RUN_iSP=start "TUFLOW" /wait "%TUFLOWEXE_iSP%" -cp "D:\tuflow_models\copy"
set A=5m 2.5m
set source_results=..\results
set destination_results=C:\tuflow_models\copy\results
FOR %%a in (%A%) do (
:: Copy model
%RUN_iSP% -s1 %%a M01_~s1~_001.tcf
:: Copy results folder to copy model location
robocopy "%source_results%" "%destination_results%" "M01_%%a_001*" /S
)
pause
</pre>
| |||