batch-file Using Goto


Goto Is simple. By using simple goto statements, you can move anywhere you want to in your code. It can be also used to make functions (Showed in how to make functions).


  • goto :Label
  • goto Label
  • goto :EOF


:LabelAny label that is valid (defined by :<LabelName>)
:EOFA pre-defined label that exits the current script of function(same as exit /b)


So in other words, if the number the player inserted is 1, it'll go back to the :Name part of the code.

so if the input is equal to 1, go back to the line with :Name

Make Sure if you use this, the word begins with the Colen (:).