I am trying to echo a loop function to another file and I need to echo two percent signs to it
What I have:
echo for /l %%x in (1, 1, 100) do echo %%x > main.bat
echo pause >> main.bat
Output:
for /l %x in (1, 1, 100) do echo %x
pause
I am trying to echo a loop function to another file and I need to echo two percent signs to it
What I have:
echo for /l %%x in (1, 1, 100) do echo %%x > main.bat
echo pause >> main.bat
Output:
for /l %x in (1, 1, 100) do echo %x
pause
You found out that, because of escaping mechanisms, echo %%
gets you one %
.
So if you need %%
then do echo %%%%
.