Skip to content

Comment on Shhh: The Undocumented DOS Commands (1999)parent

Comments

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.

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).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.