I was thinking if it was possible to use an "and" in "if" like:
Code: Select all
if %string1% and %string2%==%string3% (goto ok) else (goto nop)
:ok
cls
echo String 1 and 2 are the same as string 3.
pause
exit
:nop
cls
echo String 1 and 2 aren't the same as string 3.
pause
exit
I usually I do it like this:
Code: Select all
If %string1%==%string3% (goto check2) else (goto nop)
:check2
if %string2%==%string3% (goto ok) else (goto nop)
:ok
cls
echo String 1 and 2 are the same as string 3.
pause
exit
:nop
cls
echo String 1 and 2 aren't the same as string 3.
pause
exit
But it would be easyer if there was an "and"
(is it easyer or easy-er?)
It could be an "and" or a comma or something.
Code: Select all
if %String1%,%string2%==%string3%
But it doesn't work..
Please help me here.