Can anyone explain how cmd handles carats in the following examples?
C:\>set ^^=test
C:\>echo %^%
test
C:\>echo ^%^%
test
C:\>echo %^^%
%^%
I realized that it %^%would be handled as simple as that %%. I assume that variable expansion is processed before the carat is considered, however this is a half-put answer to the question, which, I am sure, could be more eloquently explained.
In batch mode -
@echo off
set ^^=test
echo %^%
echo ^%^%
echo %^^%
-
C:\>test.bat
test
test
ECHO is off.
source
share