Reputation: 25
for path
>echo %path%
>path
both works but
for os
>echo %os% works
>os gives error
Upvotes: 0
Views: 26
Reputation: 171
That is because "path" is a command, defined in CMD.EXE. And "echo" is another command. But %os% is a variable, not a command. Basically commands are defined if they are useful. Having a separate command to output the OS version other than "echo" was not deemed necessary.
Upvotes: 1