Reputation: 55
%VAR%=VARIABLE
I need to echo %VAR% to file so after command:
ECHO %VAR% > FILE.TXT
content of FILE.TXT will be:
%VAR%
But since %VAR%
was defined and assigned value, file will look like
VARIABLE
What do i need to add to my command to make it echo %VAR%
and not the value?
Upvotes: 0
Views: 67
Reputation: 154
You could turn on local variables and set %var% to blank.
You can also escape it with the caret. echo ^%var^%
See setlocal /?
Upvotes: 2