Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
taripo
- Posts: 228
- Joined: 01 Aug 2011 13:48
#1
Post
by taripo » 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?
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.
Thanks
-
jfl
- Posts: 226
- Joined: 26 Oct 2012 06:40
- Location: Saint Hilaire du Touvet, France
-
Contact:
#2
Post
by jfl » 31 Jan 2020 10:16