prompt(CMD) 19 June 1992 prompt(CMD) Name prompt - change the MS-DOS command prompt Syntax prompt [text] Description You can customize the command prompt to display any text you want, including such information as the name of the current directory, the time and date, and the MS-DOS version number. Parameter text Specifies any text and information you want included in your system prompt. The following list shows the character combinations you can include instead of, or in addition to, any character string(s) in the text parameter. The list includes a brief description of the text or information that each character combination adds to your command prompt. $q = (equal sign) $$ $ (dollar sign) $t Current time $d Current date $p Current drive and path $v MS-DOS version number $n Current drive $g > (greater-than sign) $l < (less-than sign) $b | (pipe) $ EnterLinefeed $e ASCII escape code (code 27) $h Backspace (to delete a character that has been written to the prompt command line) Notes Using the prompt command without the text parameter When you use the prompt command without specifying a value for text, prompt resets the command prompt to the default setting, the current drive letter followed by a greater-than sign (>). Using the $p value for text If you include the $p character in the text parameter, MS-DOS reads your disk after you enter each command to determine the current drive and path. This can take extra time, especially for floppy disk drives. Examples The following example sets the command prompt to display the current drive and path followed by the greater-than sign (>): prompt $p$g The following command displays a two-line prompt in which the current time appears on the first line and the current date appears on the second line: prompt time is: $t$date is: $d If your CONFIG.SYS file loads ANSI.SYS, you can use ANSI escape sequences in your prompts. The following command, for example, displays your prompt in reverse video mode and returns to usual video mode for other text: prompt $e[7m$n:$e[m The characters following the escape code ($e) are ANSI escape sequences. Related commands For information about setting the current date and time, see the date(CMD) and time(CMD) commands.