Environment variables: These have the %VARIABLE% form and are associated with values with the SET statement. Before DOS 3 COMMAND.COM will only expand environment variables in batch mode; that is, not interactively at the command prompt.[ต้องการอ้างอิง]
Replacement parameters: These have the form %0, %1...%9, and initially contain the command name and the first nine command line parameters passed to the script (e.g., if the invoking command was "myscript.bat John Doe", then %0 is "myscript.bat", %1 is "John" and %2 is "Doe"). The parameters to the right of the ninth can be mapped into range by using the SHIFT statement.
Loop variables: Used in loops, they have the %%a format when run in batch files. These variables are defined solely within a specific FOR statement, and iterate over a certain set of values defined in that FOR statement.
Because DOS is a single-tasking operating system, piping is achieved by running commands sequentially, redirecting to and from a temporary file. COMMAND.COM makes no provision for redirecting the standard error channel.
Commands separated by ASCII-20 (¶, invoked by Ctrl+T) are executed in sequence (chaining of commands). In other words, first command1 is executed until termination, then command2. This is an undocumented feature in COMMAND.COM of MS-DOS/PC DOS 5.0 and higher. It is also supported by COMMAND.COM of the Windows NT family as well as by DR-DOS 7.07. All versions of DR-DOS COMMAND.COM already supported a similar internal function utilizing an exclamation mark (!) instead (a feature originally derived from Concurrent DOS and Multiuser DOS) - however, in the single-user line this feature was only available internally (in built-in startup scripts like "!DATE!TIME") and indirectly through DOSKEY's $T parameter to avoid problems with ! as a valid filename character.4DOS supports a configurable command line separator (4DOS.INI CommandSep= or SETDOS /C), which defaults to ^. COMMAND.COM in newer versions of Windows NT also supports a & separator for compatibility with the cmd syntax in OS/2 and the Windows NT family. (cmd, however, does not support the ¶ separator.)
"Loading COMMAND.COM" message can be seen on a HUD view of the Terminator and the internal viewport of RoboCop when he reboots.
In the CGI children's TV series ReBoot, which takes place inside computers, the leader of a system (the equivalent of a city) is called the COMMAND.COM.
The command.com domain once hosted a website with an image of a command prompt that has finished running the "dir" command on the root of an empty C drive. However, the resulting command incorrectly displayed the . and .. directories, which are never shown in the root of a drive.
↑Paul, Matthias (1997-05-01) . BATTIPs — Tips & Tricks zur Programmierung von Batchjobs. MPDOSTIP (ภาษาเยอรมัน). 7: ERRORLEVEL abfragen. คลังข้อมูลเก่าเก็บจากแหล่งเดิมเมื่อ 2017-08-23. สืบค้นเมื่อ 2017-08-23. (NB. BATTIPS.TXT is part of MPDOSTIP.ZIP. The provided link points to a HTML-converted older version of the BATTIPS.TXT file.)
↑ 8.08.18.2Brothers, Hardin; Rawson, Tom; Conn, Rex C.; Paul, Matthias; Dye, Charles E.; Georgiev, Luchezar I. (2002-02-27). 4DOS 8.00 online help. Multiple Commands: You can type several commands on the same command line, separated by a caret . For example, if you know you want to copy all of your .TXT files to drive A: and then run CHKDSK to be sure that drive A's file structure is in good shape, you could enter the following command: C:\>COPY *.TXT A: ^ CHKDSK A: You may put as many commands on the command line as you wish, as long as the total length of the command line does not exceed 511 characters. You can use multiple commands in aliases and batch files as well as at the command line. If you don't like using the default command separator, you can pick another character using the SETDOS /C command or the CommandSep directive in 4DOS.INI. SETDOS /C: (Compound character) This option sets the character used for separating multiple commands on the same line. The default is the caret . You cannot use any of the redirection characters , or the blank, tab, comma, or equal sign as the command separator. The command separator is saved by SETLOCAL and restored by ENDLOCAL. This example changes the separator to a tilde : C:\>SETDOS /C~ (You can specify either the character itself, or its ASCII code as a decimal number, or a hexadecimal number preceded by 0x.) CommandSep = c (^): This is the character used to separate multiple commands on the same line. Special Character Compatibility: If you use two or more of our products, or if you want to share aliases and batch files with users of different products, you need to be aware of the differences in three important characters: the Command Separator , the Escape Character , and the Parameter Character . The default values of each of these characters in each product is shown in the following chart: Product, Separator, Escape Parameter 4DOS: ^, ↑, & 4OS2, 4NT, Take Command: &, ^, $ (The up-arrow represents the ASCII Ctrl-X character, numeric value 24.)
↑Paul, Matthias (1997-07-01) . MSDOSTIPs — Tips für den Umgang mit MS-DOS 5.0-7. MPDOSTIP (ภาษาเยอรมัน). คลังข้อมูลเก่าเก็บจากแหล่งเดิมเมื่อ 2017-08-22. สืบค้นเมื่อ 2013-10-25. (NB. MSDOSTIP.TXT is part of MPDOSTIP.ZIP, maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the MSDOSTIP.TXT file.)