I have a task: print all entries of %PATH% variable on new line. For example:
C:\Program Files\
C:\Windows
C:\Windows\System32
and so on...
If you type in a built-in command like ls, it will look for a specified list of directories. You can look up your path by typing echo $PATH. Here is one difference between Windows and *nix: By default, Windows always looks for the executable file in the current directory. For example, if you have a file called uptime.
Select Start > All Programs > Accessories > Command Prompt. In the command window that opens, enter echo %VARIABLE%. Replace VARIABLE with the name of the environment variable.
Solved: I used echo %path:;=&echo.%
Source (the original link is dead, now linking to WebArchive)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With