Category:MSX-DOS 2 Internal Variable Functions
Description
Since COMMAND2.COM version 2.40, you can directly access many internal variable functions of the MSX-DOS 2 system.
Variable functions are similar to MSX-DOS 2 Internal Variables, but they take one or more arguments, and they return a value. The variable functions are useful in aliases and batch files to check on available system resources, manipulate strings and numbers, and work with filenames.
Usage
- Like all environment variables, these variable functions must be enclosed in percent signs in normal use (%@ALIAS%, %@ASCII%, etc.). All variable functions must have square brackets enclosing their argument(s).
- If you embed a variable function in the PROMPT environment variable, it must be enclosed in either single (') or double quotes (").
- Instead of a parameter, a variable function can also include another variable function, or internal variable, whose value serves as a parameter for the previous variable function. For example: A:\>ECHO %@DISKFREE[%_DISK%:,K]% - it will return the free amount of disk space on the current active drive.
- The depth of the recursive use of variable functions is unlimited, as long as it fits on the command line, which has a maximum length of 127 characters.
- When an error occurs either in the given parameters, or during disk access, then a null string is returned.
List of Internal Variable Functions
Version = COMMAND2.COM version that introduces or improves this variable function.
Function | Version | Related Commands | Environment Variables | Internal Variables |
---|---|---|---|---|
@ALIAS | 2.40 | ALIAS, SET | ALIAS | |
@ASCII | 2.40 | |||
@ATTRIB | 2.40 | ATDIR, ATTRIB, DIR | ||
@CHAR | 2.40 | |||
@DISKFREE | 2.40 | FREE | ||
@DISKTOTAL | 2.40 | FREE | ||
@DISKUSED | 2.40 | FREE | ||
@DRIVE | 2.40 | |||
@EXT | 2.40 | |||
@FFIRST | 2.40 | _FILECOUNT, _FNEXT | ||
@FILE | 2.40 | |||
@FILEATTR | 2.40 | ATDIR, ATTRIB, DIR, VOL | ||
@FILEDATE | 2.40 | DATE, DIR, SET | DATE | |
@FILESIZE | 2.40 | DIR | ||
@FILETIME | 2.40 | DIR, SET, TIME | TIME | |
@FILETOTAL | 2.40 | _FILECOUNT, _FNEXT | ||
@FULL | 2.40 | |||
@HEX | 2.40 | |||
@INSTR | 2.40 | |||
@LABEL | 2.40 | DIR, VOL | ||
@LEFT | 2.40 | |||
@LEN | 2.40 | |||
@LOWER | 2.40 | UPPER | ||
@MID | 2.40 | |||
@NAME | 2.40 | |||
@NEWFILE | 2.40 | RENAME | ||
@PARSE | 2.40 | |||
@PATH | 2.40 | |||
@READY | 2.41 | _DRIVEMAP | ||
@RIGHT | 2.40 | |||
@STRING | 2.44 | |||
@UPPER | 2.40 | UPPER |
Pages in category "MSX-DOS 2 Internal Variable Functions"
The following 32 pages are in this category, out of 32 total.
@ |
@ cont. |
@ cont. |