LookinAround
Posts: 6,429 +186
Question:
I want the syntax that allows one Windows shell variable expand within another variable. How do i do it? Let me functionally explain what i want
1) Windows defines a shell variable USERPROFILE for each user logon shell (and that's what i want to reference indirectly in a commanded prompt window)
2) I essentially want to define another (shell or environment?) variable named out= something like "%USERPROFILE%\Desktop\outfile.txt" such that all i need do in a command prompt window is type
and then see a file appear on my desktop named outfile.txt containing the word hello
What's the syntax????
I want the syntax that allows one Windows shell variable expand within another variable. How do i do it? Let me functionally explain what i want
1) Windows defines a shell variable USERPROFILE for each user logon shell (and that's what i want to reference indirectly in a commanded prompt window)
2) I essentially want to define another (shell or environment?) variable named out= something like "%USERPROFILE%\Desktop\outfile.txt" such that all i need do in a command prompt window is type
Code:
[b]echo hello > %out%[/b]
What's the syntax????