I have read both the following posts and found that neither of them seem to answer my question How to call one batch file after another, Execute batch file after another batch file completes.
I am attempting to run a series of 6 python scripts through batch files on Windows Server 2012 R2 Standard. I want the first 5 scripts to run simultaneously (Processing.bat), which is currently comprised of five sub bat files (North.bat, West.bat, South.bat, Central.bat, Northeast.bat). Once completed it is then supposed to run one final script that works with the outputs of the first 5 (Merge.bat).
I have tried several combinations of call and start /wait and nothing seems to do it right. Currently my primary bat file looks like:
start /wait Processing.bat
start /wait Merge.bat
Processing.bat looks like:
start North.bat
start South.bat
start NorthEast.bat
start West.bat
start Central.bat
IF %ERRORLEVEL% EQU 0 EXIT
each sub bat looks like:
start /wait C:\Python27\ArcGIS10.4\python.exe E:\TestScript.py Central
IF %ERRORLEVEL% EQU 0 EXIT
and finally merge.bat looks like:
start /wait C:\Python27\ArcGIS10.4\python.exe E:\MergeSDE.py
IF %ERRORLEVEL% EQU 0 EXIT
With this setup all 6 scripts will run at once (rather than 5 followed by 1). But the respective command prompt windows will stay open until each script completes (7 windows). The kicker is that if I am to change "start" in Processing.bat to "start /wait" it will run each one after the other (which of the first 5, I don't want), yet with "start /wait" in the primary batch all sub batches run at once.