Commodore PC Ms-Dos 3.2 User's Manual page 184

Table of Contents

Advertisement

1112 MS-DOS User's Reference
:
U
Goto
GotO
I
Purpose:
M
Processes commands starting with the line after the specified
label.
Syntax:
goto label
Comments:
Goto lets you take commands from the batch file beginning with
the line after the label, where a label is defined as the characters
following goto. This label may include spaces, but not other
separators, such as semicolons or equal signs. If your batch file
does not contain the label, the batch file terminates.
(
\
Note
Any line in a batch file that starts with a colon (:) is
ignored during batch processing.
Example:
,
The following example sends the program processor to the label
named end only if no errors occur when you format the disk in
drive A:
i
\
:begin
echo
off
format a:
/s
ivs
j
if
errorlevel
0
goto
end
echo
An
error
occurred
during
formatting.
:end
echo
End
of
batch
file.

Advertisement

Table of Contents
loading

Table of Contents