
Re: Echo command and environment variable
It depends of the context.
If you want do it from a batch file then the solution of miskox works.
But from the cmd shell it doesn't work the same way.
There doesn't exist an escape possibility, but you can use a workaround.
Code:
echo %^windir%>outputfile.txt
or
echo %windir^%>outputfile.txt
or
echo %win^dir%>outputfile.txt
jeb