Article ID: 63071 - Last Review: May 12, 2003 - Revision: 2.0 Only First 8 Characters in a Batch Label RecognizedThis article was previously published under Q63071 On This PageSUMMARY
MS-DOS recognizes only the first eight characters of a batch file label;
subsequent characters are ignored.
NOTE: This eight-character limitation also applies to the %config% variable passed to the AUTOEXEC.BAT file in MS-DOS versions 6.0 or later when you use multi-boot configurations. For example, the labels LATESTCHANGE and LATESTCHANGES are identical to MS- DOS. The line "GOTO LATESTCHANGE" (without the quotation marks) transfers to the first label in the file that has same first eight characters as LATESTCHANGE. MORE INFORMATION
The following examples illustrate this limitation.
Example 1The following example
goto latestch
displays the following
: latestchanges echo two : latestch echo three
two
rather than displaying the following:
three
three
Example 2The following example
:latestch
displays the following until CTRL+C is pressed, terminating the batch
file:
echo zero :latestchanges echo one goto latestchanges
zero one zero one zero one etc. APPLIES TO
| Article Translations
|

Back to the top
