batch file - Read / Echo Environmental Variable as Literal -
very basic, or thought. i've got string in command prompt:
c:\>echo "start c:\users\%username%\my documents" >> test.txt i've tried %%username%%, '%username%', '%'username'%', , many other ways. batch output resolves environmental variable rather writing literal string of text. possible make sure reads literal string of text , not environment variable resolves to?
echo start ^"^" ^"c:\users\^%username^%\my documents^" >> test.txt this should work.
Comments
Post a Comment