If your variable is empty somewhere, it will be the same as having the command “echo” on its own, which will just print the status of echo.
To avoid this, you should replace all your echo
commands with something like this:
echo var2: %var2%
That way, if %var2%
is empty it will just print “echo var2:” instead of “echo off”.