What is wrong with the following command lines for my batch script?
set test=BE99012345678901
if %test% == "BE99????????????"(
echo This number begins with BE99
)
Else (
echo This number doesn't begin with BE99
)
pause
batchcmd.exeechostring
What is wrong with the following command lines for my batch script?
set test=BE99012345678901
if %test% == "BE99????????????"(
echo This number begins with BE99
)
Else (
echo This number doesn't begin with BE99
)
pause
Best Answer
Try this:
You will get following output:
This number begins with BE99
Kindly note:
if %test% == "BE99????????????"
will do this:"BE99012345678901" == "BE99????????????"
and this will show following output:
This number doesn't begin with BE99