Echo command and environment variable
HI
Using the echo command
of Windows 7 SP1, how can I
insert, in a text file, an environment variable
(like %WINDIR%) without that it
is first interpreted by the shell?
THANKS
BYE
Balubeto
May 6th, 2012 3:36am
You mean something like this (?)
echo %WINDIR%
Regards
Milos
Free Windows Admin Tool Kit Click here and download it now
May 6th, 2012 4:09pm
You need to quote the character % with ^. If you want to add your eviroment variable (ex. %WINDIR%) to the file example.txt
c:\>echo ^%WINDIR^% >> c:\example.txt
c:\>type c:\example.txt
c:\>%WINDIR%
Gastone Canali >http://www.armadillo.it
Se alcuni post rispondono al tuo quesito (non necessariamente i miei), ricorda di contrassegnarli come risposta e non dimenticare di contrassegnare anche i post utili . GRAZIE!
May 6th, 2012 6:12pm