why doesn't this setting and displaying environment variable work?
Posted: 30 Jan 2020 03:36
been a while since I used batch files, I tend to use them very rarely and don't tend to remember some of the idiosyncracies and I try some tests to figure them out but this simple one has me stuck.
why doesn't this setting and displaying environment variable work?
Thanks
why doesn't this setting and displaying environment variable work?
Code: Select all
C:\blah>type testenvv.bat
set %%ppp%%="tgt"
set %ppp%="tgt"
echo %%ppp%%
echo %ppp%
C:\blah>
Code: Select all
C:\blah>testenvv.bat
C:\blah>set %ppp%="tgt"
C:\blah>set ="tgt"
The syntax of the command is incorrect.
C:\blah>echo %ppp%
%ppp%
C:\blah>echo
ECHO is on.