You are currently offline, waiting for your internet to reconnect

Equal-Sign Characters as Arguments in Batch Files

This article was previously published under Q35938
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.
Using batch files in MS-DOS, it is not possible to include an equalsign as an argument to a batch file. The batch file parser considersthis to be a delimiter, such as a space or tab character. Thus, usingthe 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 firstargument, and "two" the second argument, with the equal sign being adelimiter. This makes it impossible to enter equal signs in batchfiles as command-line options.
6.22 2.00 2.10 2.11 2.25 3.00 3.10 3.20 3.22 3.30 3.30A 4.00 5.00 5.00a 6.00 6.20
Properties

Article ID: 35938 - Last Review: 11/16/2006 13:39:45 - Revision: 2.1

  • 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
  • KB35938
Feedback