M
Mr Novice
Consider the following example...
1 set /p findingnemo=(A / B)
2
3 :baltimore
4 if /i "%findingnemo%"=="a" (
5 cls
6 echo You selected option A.
7 echo.
8 set /p toystory=Is this correct? (Y /N^)
9 if /i "%toystory%"=="y" (
10 set peterpan=option_a
11 goto washingtondc
12 )
13 if /i "%toystory%"=="n" goto cleveland
14 goto baltimore
15 )
The script is asking you to make a selection. After making
your selection it will ask you to confirm it. If you
select either Y or N for the confirmation it will take you
back to line 3 as if you had selected an incorrect option.
The second time you answer the confirmation question the
script works successfully. Can anybody explain this?
Thanks,
Chad
1 set /p findingnemo=(A / B)
2
3 :baltimore
4 if /i "%findingnemo%"=="a" (
5 cls
6 echo You selected option A.
7 echo.
8 set /p toystory=Is this correct? (Y /N^)
9 if /i "%toystory%"=="y" (
10 set peterpan=option_a
11 goto washingtondc
12 )
13 if /i "%toystory%"=="n" goto cleveland
14 goto baltimore
15 )
The script is asking you to make a selection. After making
your selection it will ask you to confirm it. If you
select either Y or N for the confirmation it will take you
back to line 3 as if you had selected an incorrect option.
The second time you answer the confirmation question the
script works successfully. Can anybody explain this?
Thanks,
Chad