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!

Introduction

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

Syntax

  • goto :Label
  • goto Label
  • goto :EOF

Parameters

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

Remarks

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?