Article ID: 35938 - Last Review: November 16, 2006 - Revision: 2.1

Equal-Sign Characters as Arguments in Batch Files

This article was previously published under Q35938
Using batch files in MS-DOS, it is not possible to include an equal sign as an argument to a batch file. The batch file parser considers this to be a delimiter, such as a space or tab character. Thus, using the following one-line batch file (named TEST.BAT):
echo %1 %2
If the following is entered:
TEST one=two
it would produce the following output
one two
which shows that the batch file parser considers "one" the first argument, and "two" the second argument, with the equal sign being a delimiter. This makes it impossible to enter equal signs in batch files as command-line options.
Expand all | Collapse all

APPLIES TO
  • Microsoft MS-DOS 3.1
  • Microsoft MS-DOS 3.2 Standard Edition
  • Microsoft MS-DOS 3.21 Standard Edition
  • Microsoft MS-DOS 3.3 Standard Edition
  • Microsoft MS-DOS 3.3a
  • Microsoft MS-DOS 4.0 Standard Edition
  • Microsoft MS-DOS 4.01 Standard Edition
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a
  • Microsoft MS-DOS 6.0 Standard Edition
  • Microsoft MS-DOS 6.2 Standard Edition
  • Microsoft MS-DOS 6.21 Standard Edition
  • Microsoft MS-DOS 6.22 Standard Edition
Keywords: 
KB35938
Retired KB ArticleRetired 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.
 

Article Translations