How to echo the variable's value containing percent signs?
8,022
You should double percent signs %%var%%
@echo off
set "var=Hello"
echo in my variable %%var%% ===^> %var%
pause
Related videos on Youtube
![INTENSEFIRE](https://lh5.googleusercontent.com/-jJ0TzgzcEuw/AAAAAAAAAAI/AAAAAAAAABs/nv0ijG43C9M/photo.jpg?sz=256)
Author by
INTENSEFIRE
Updated on September 18, 2022Comments
-
INTENSEFIRE almost 2 years
I want to echo a variable with the %'s.
Ex:
set var=Hello echo %var%
That would obviously result in echoing "Hello", but how can I get it to just echo
%var%
?