Quincy Center for Technical Education
Computer Technology Department

goto

Directs Windows 2000 to a line in a batch program marked by a label you specify.

The goto command directs Windows 2000 within a batch program to a line identified by a label. When Windows 2000 finds the label, it processes the commands beginning on the next line.

goto label

Parameter

label

Specifies the line in a batch program to which Windows 2000 should go. If command extensions are enabled (the default setting in Windows 2000), goto changes as follows:

Using the goto command with a target label of :EOF transfers control to the end of the current batch script file, exiting the batch script file without defining a label. When using goto with the :EOF label, you must insert a colon before the label, for example:

goto :EOF

For a description of extensions to the call command that make this feature useful, or for a discussion of enabling command extensions, click cmd in the Related Topics list.