rem This simple batch file illustrates how to use a batch file to run GoldSim. rem rem In order for this file to work, you must change the following two rem lines or variables so that they reflect the actual directories on rem your system. rem rem GSDIR is the directory where GOLDSIM (goldsim.exe) is found on your system. rem GFLOC is the directory where the GoldSim file(s) can be found. rem SET GSDIR="C:\Program Files (x86)\GTG\GoldSim 12.0" SET GFLOC="C:\Working" rem rem Change to the GoldSim executable directory (required for Start command to work) rem cd %GSDIR% rem rem Now do the examples. Start /wait ensures that GoldSim completes before carrying out the next command rem start /wait goldsim.exe -x -sv %GFLOC%\R1.gsm %GFLOC%\BatchFileExample.gsm rem This line opens BatchfileExample.gsm, saves it as R1.gsm (without running it), and closes GoldSim rem start /wait goldsim.exe -r -sv %GFLOC%\R2.gsm -d "Data1=5" -x %GFLOC%\R1.gsm rem This line opens R1.gsm, sets Data1 equal to 5, runs the model, saves R2.gsm (in Result Mode), and closes GoldSim rem start /wait goldsim.exe -r -sv %GFLOC%\R3.gsm -d "Data1=10" -x %GFLOC%\R2.gsm rem This line opens R2.gsm, sets Data1 equal to 10, runs the model, saves R3.gsm (in Result Mode), and closes GoldSim