I am trying to get a batch (.cmd) file to run an executable and wait until it has finished before executing the next batch command. I believe ‘start /wait’ is supposed to do this – but it is not happening for me.
If I run:
CD “C:\Program Files\Allway Sync\Bin\
“C:\Program Files\Allway Sync\Bin\”syncappw.exe -s “Sun” -e””
all is ok in that syncappw runs, and if I put a timeout command after the syncappw command then everything works – provided the timeout is long enough.
But if I use
CD “C:\Program Files\Allway Sync\Bin\
start /wait “C:\Program Files\Allway Sync\Bin\”syncappw.exe -s “Sun” -e””
it always parses incorrectly wherever I put the quotes, and never runs syncappw. For example, running exactly as shown here I get “Windows cannot find ‘-s’.” Have I just not found the right places to put the quotes or is something else happening here”