Tutorial by Examples

For Example: echo Hello! pause >nul :Name echo What Is Your Name set /p Input=Name: echo so %Input% Is Your Name, right? echo Rename? echo 1 For Yes echo 2 For No set /p Input=Rename: if %Input%=1 goto Name Another Example: @echo off echo 1 or 2? set /p input=Choice: if %input...
Goto accepts the use of variable value to act as the label to goto. Example: @echo off echo a = 1 echo b = 2 set /p "foo=Enter option:" goto %foo% However, you should check the input so it will not go to somewhere that does not exist. Going to an undefined label will terminate...

Page 1 of 1