help.hlp (Table of Contents; Topic list)
GOTO--Notes
Example  Syntax
────────────────────────────────────────────────────────────────────────────
 
                                GOTO──Notes
 
Valid values for label
 
The label parameter cannot include separators such as spaces, semicolons or
equal signs.
 
GOTO uses the first eight characters of each label
 
The GOTO command uses only the first eight characters of a label. Therefore,
the labels "hithere01" and "hithere02" are both equivalent to "hithere0".
 
Matching the label parameter with the label in the batch program
 
The label value you specify on the GOTO command line must match a label in
the batch program. The label within the batch program must be preceded by a
colon.
 
If your batch program does not contain the label that you specify, the batch
program stops and MS-DOS displays the following message:
 
    Label not found
 
MS-DOS recognizes a batch-program line beginning with a colon (:) as a label
and does not process it as a command. If a line begins with a colon, MS-DOS
ignores any commands on that line.
 
Using GOTO for conditional operations
 
GOTO is often used on the same command line with other commands to perform
conditional operations. For more information about using GOTO for
conditional operations, see the <IF> command.
 
                                      ♦