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

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -