Hi, I want to write a code in batch file.
It is like if else statement.There are two variables.
Writing in usual language
Say Complete=244,Fail=0
if Complete=244 and Fail=0 means goto Pass
If complete=240 and fail=4 means goto failI dont know how to merge to conditions in a if statement.
:pass
Echo load completed succesfully
:Fail
Echo load failed so starting services
Start serviesend
How can i achieve the above in batch file.
Please help me
Regards,
venugopal

The following code translates what you posted into a batch executable script, but your knowledge of scripting looks poor so I can't assure you can achieve a working result. if %Complete% equ 244 if %Fail% equ 0 (
echo. Load completed succesfully & goto :END
)
if %Complete% equ 240 if %Fail% equ 4 (
echo. Load failed so starting services
Start services
)
:END
What about:
IF %COMPLETE%==244 (IF %FAIL%==0 GOTO PASS) ELSE IF %COMPLETE%==240 IF %FAIL%==4 GOTO FAILThat's all one line.
[edit]
I do realise the message above integrates the whole thing into one small script. Just another option...
