Microsoft KB Archive/35938

= Equal-Sign Characters as Arguments in Batch Files =

Article ID: 35938

Article Last Modified on 11/16/2006

-

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

-



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 &quot;one&quot; the first argument, and &quot;two&quot; 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.

Additional query words: 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

Keywords: KB35938

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.