@ECHO OFF
REM
REM   TS-MANAGER BY TCO
REM
REM   Batch Script Example
REM
REM   NOTE: You have to edit the Command Lines to your purpose!
REM         Remove or add Jobs as needed.
REM         Change the Extension of this Script File from ".cmd.txt" to ".cmd"!
REM
SET /A COUNTER=0
REM
REM ------------------------------------------------------------
REM   JOB 1
TS-Manager.exe "(TS-PRESET).Metronom Network.LST" /B
SET /A Counter=%COUNTER%+%ERRORLEVEL%
REM ------------------------------------------------------------
REM   JOB 2
TS-Manager.exe "(SCENARIOS-PRESET).Route Hamburg-Hannover - 3DZUG.LST" /C /S
SET /A Counter=%COUNTER%+%ERRORLEVEL%
REM ------------------------------------------------------------
REM   JOB 3
TS-Manager.exe "(SCENARIOS-PRESET).Route Hamburg-Bremen - Selection1.LST" /C/S
SET /A Counter=%COUNTER%+%ERRORLEVEL%
REM ------------------------------------------------------------
REM   JOB 4
TS-Manager.exe "(SCENARIOS-PRESET).Route Hamburg-Bremen - Selection2.LST" /CS
SET /A Counter=%COUNTER%+%ERRORLEVEL%
REM ------------------------------------------------------------
REM
IF %COUNTER% EQU 0 ECHO  - TS MANAGER successful quited without any Error -
IF %COUNTER% EQU 0 REM - IN THIS LINE YOU CAN PUT A COMMAND OR CALL A BATCH SCRIPT WHICH WILL BE EXECUTED AFTER A SUCCESSFUL RUN, E.G.:  C:\-TS-PATH-\RailWorks.exe
IF %COUNTER% EQU 0 GOTO 1
ECHO  - While Session %COUNTER% Error(s) occured! -
REM - IN THIS LINE YOU CAN PUT A COMMAND OR CALL A BATCH SCRIPT WHICH WILL BE EXECUTED AFTER AT LEAST ONE ERROR OCCURED
:1
PAUSE > NUL
