Article ID: 39627 - View products that this article applies to.
This article was previously published under Q39627
The labels of batch files, which are interpreted with the MS-DOS COMMAND.COM command interpreter, are not case sensitive. For example, the following labels, as well as any other capitalization combinations, are equivalent:
:ONEThis is because the command processor converts all label characters to uppercase to resolve label references when it processes a batch file.
In the following batch file, the labels "TWO" and "Two", as well as "End" and "END" are interpreted as the same label:
if %1 == one then goto :TWOThe following batch file executes the first occurrence of the label, disregarding the capitalization of that label:
echo One Testing.
@echo offEven though the label in the second line is lowercase, the batch file executes the first occurrence of the label. The output of the batch file, if invoked with "one" as the first parameter, would be as follows:
if %1 == one goto test1
echo Test 1
echo Test 2
Article ID: 39627 - Last Review: November 26, 2003 - Revision: 3.0
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.