Hacker News new | ask | show | jobs
by jimmyswimmy 2218 days ago
It was % to indicate environment variables.

echo %PATH%

Should work, as long as that variable is in scope, which it should be on an old MSDOS platform with a single thread.

1 comments

Environmental variables have scopes?
Its probably that variables defined in AUTOEXEC are "global" scope, i.e. can be referenced in any other batch file, but variables defined within a batch file other than AUTOEXEC only exist within the scope (context) of that batch file. But, I haven't tested this...
I think in DOS they were all global in scope. SETLOCAL appeared with Windows NT (cmd.exe), not sure which version (I didn't use the early ones).