Tuesday, 28 January 2020

How can I display the contents of an environment variable from the command prompt in Windows 7?


In Windows 7, when I start the Command prompt, is there any command to display the contents of an environment variable (such as the JAVA_HOME or PATH variables)?


I have tried with echo $PATH, echo PATH and $PATH but none of these work.



Answer



In Windows Command-Prompt the syntax is echo %PATH%


To get a list of all environment variables enter the command set


To send those variables to a text file enter the command set > filename.txt




Related



No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...