Is someone able to explain how cmd handles carats, in the following examples?
C:\>set ^^=test
C:\>echo %^%
test
C:\>echo ^%^%
test
C:\>echo %^^%
%^%
I figured that %^%
would be handled as simply %%
. I assume that the variable expansion is handled before the carat is considered, however that is a half arsed answer to a question that I'm sure could be more eloquently explained.
In batch -
@echo off
set ^^=test
echo %^%
echo ^%^%
echo %^^%
--
C:\>test.bat
test
test
ECHO is off.