For the longest time I have used 4NT as a replacement for the Windows CMD.exe shell. It provides an environment variable, _CWD, that provides the current working directory. I never knew that Windows also provides the same thing, in the form of the CD environment variable. This led me to look for other system-wide default dynamic variables that Windows provides.
I've found these:
Variable | Sample Typical Value |
---|---|
%CD% | The current directory. |
%DATE% | Current date in the format set by the Date command |
%TIME% | Current time in the format set by the Time command |
%ERRORLEVEL% | A number defining exit status of a previous command or called executable. |
%RANDOM% | A random number between 0 and 32767. |