I have two lines of call command in batch file like this:
call execute.cmd
call launch.cmd
My need is to call the launch.cmd if and only if call to execute.cmd succeeds.
So is there any way by which can I put some condition here?
execute.cmd does not return any value here.
If
execute.cmdreturns an integer than you can use aIF commandto check it’s return value and if it matches the desired one than you can calllaunch.cmdSuppose that
execute.cmdreturns 0 if it is successful or an integer >= 1 otherwise. The batch would look like this:note that the
remcommand is used for comments.HTH,
JP