At the command line, I type
set var = xxx
then
set var
and I get the response
var = xxx
as expected.
If I then type
echo %var%
I get the response
%var%
not, as I’d expect
xxx
If, however, I type
echo %path%
the response is the path sequence, as I’d expect.
What am I missing?
You actually defined a variable called var
(note the extra space on the right hand side), not var
.
> set var = xxx
> set var
var = xxx
> echo %var%
%var%
> echo %var %
xxx
> set var=xxx
> set var
var=xxx
var = xxx
> echo %var%
xxx
1