J
jgreinecke
Hello all,
I'm using WinXP ver 5.1.2600 (at least 'ver' tells me so)
and try to create an environmental variable whose value
contains an ampersand (&) (like at&t)
The MS Product Documentation tells me:
However when I tried this :
set prv=at^&t
echo %prv%
The response was:
-> at
-> 't' not recognized as program... etc.',
That is, XP was looking for an executable named 't' which
wasn't there.
Even more puzzling, the following command worked fine:
set dmy=^&(dummy^)
echo %dmy%
-> (dummy).
Hence my question: Why did the escape character work in front
of parentheses, and did not work in front of the ampersand?
Any help welcome!
Jürgen
I'm using WinXP ver 5.1.2600 (at least 'ver' tells me so)
and try to create an environmental variable whose value
contains an ampersand (&) (like at&t)
The MS Product Documentation tells me:
... If you use the special characters <, >, |, &, or ^, you
must precede them with the escape character (^) or quotation
marks
...
To create the variable value new&name, type:
set varname=new^&name
However when I tried this :
set prv=at^&t
echo %prv%
The response was:
-> at
-> 't' not recognized as program... etc.',
That is, XP was looking for an executable named 't' which
wasn't there.
Even more puzzling, the following command worked fine:
set dmy=^&(dummy^)
echo %dmy%
-> (dummy).
Hence my question: Why did the escape character work in front
of parentheses, and did not work in front of the ampersand?
Any help welcome!
Jürgen