2

I have to execute two batch files through a single batch file. One batch file has a command for starting a server application and other is a client application. so the condition is that once the server is up, only then client should try to hit server.

I have tried following thing,

parent.bat has a following content

start server.bat

start client.bat

and found that both applications are running separately but could not achieve the order in which it should be.

abhijeet
  • 849
  • 2
  • 19
  • 54

2 Answers2

7

Have you tried

CALL test.bat

This stops the execution of the parent script until the child finishes.

And be a bit more consequent in research issues.
My first google search for "Batch await script execution" brought up this:
how to run a batch script from within a batch script

Community
  • 1
  • 1
HappyHacking
  • 878
  • 1
  • 12
  • 28
0

An alternative to @HappyHacking solution is to use

start /wait server.bat
start client.bat

That will wait until the server script has finished before starting the client script.

Bali C
  • 30,582
  • 35
  • 123
  • 152