Category:MSX-DOS 2 Internal Variables
Description
Since COMMAND2.COM version 2.40, you can directly access many internal variables of the MSX-DOS 2 system.
These variables are not actually stored in the environment, but can be used in commands, aliases, and batch files just like any other environment variable. They are often used in batch files and aliases to examine system resources and adjust to the current computer settings.
The values of these variables are stored internally and cannot be changed with the SET command.
Usage
- The contents of any internal variable, placed between two % characters, can be examined from the command line with a command like this: A:\>ECHO %Variable%
- If you embed a variable in the PROMPT environment variable, it must be enclosed in either single (') or double quotes (").
- These variables can also be used as parameter with the MSX-DOS 2 Internal Variable Functions. In this case, they must be enclosed between square brackets with the other arguments. For example: A:\>ECHO %@DISKFREE[%_DISK%:,K]% - it will return the free amount of disk space on the current active drive.
List of Internal Variables
Version = COMMAND2.COM version that introduces or improves this variable.
Variable | Version | Related Commands | Environment Variables | Variable Functions |
---|---|---|---|---|
_BG | 2.40 | COLOR | ||
_BOOT | 2.40 | BOOT, SET | LOWER | |
_COLUMN | 2.40 | MODE | ||
_COLUMNS | 2.40 | MODE | ||
_CPU | 2.40 | CPU | ||
_CWD | 2.40 | CDD, CHDIR, DIR, SET | LOWER, PROMPT | |
_CWDS | 2.40 | CDD, CHDIR, DIR, SET | LOWER | |
_CWP | 2.40 | CDD, CHDIR, DIR, SET | LOWER | |
_CWPS | 2.40 | CDD, CHDIR, DIR, SET | LOWER | |
_DATE | 2.40 | DATE, SET | DATE | |
_DATEF | 2.40 | DATE, SET | DATE | |
_DIRBUFFER | 2.40 | CDD, CHDIR, DIR, SET | LOWER | |
_DISK | 2.40 | BOOT, SET | LOWER, PROMPT | |
_DOSVER | 2.40 | VER | ||
_DOW | 2.40 | DATE | ||
_DRIVEMAP | 2.41 | |||
_ERROR | 2.40 | EXIT | ||
_FG | 2.40 | COLOR | ||
_FILECOUNT | 2.40 | @FFIRST, @FILETOTAL | ||
_FNEXT | 2.40 | @FFIRST, @FILETOTAL | ||
_MSXVER | 2.40 2.44 | |||
_ROW | 2.40 | MODE | ||
_ROWS | 2.40 | MODE | ||
_SHELL | 2.41 | COMMAND2, SET | SHELL | |
_TIME | 2.40 | SET, TIME | TIME |