I have the following DOS commands in a batch file:
SET "REALM="
ECHO %REALM:/=.%
SET "REALM=Westeros"
ECHO %REALM:/=.%
SET "REALM=Westeros/"
ECHO %REALM:/=.%
The last two commands give me the expected results: Westeros Westeros.
But the first, replacing /
for .
on an empty variable, gives:
/=.
Why does this happen and how can I do this right?