batch-file Using Goto

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!


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 (:).

Got any batch-file Question?