------------------------ MS-DOS v6.22 Help: Prompt ------------------------- <Notes> <Examples> <Index> ---------------------------------------------------------------------------- PROMPT Changes the appearance of the command prompt. 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. Syntax PROMPT [text] 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) $_ ENTER-LINEFEED $E ASCII escape code (code 27) $H Backspace (to delete a character that has been written to the prompt command line) Related Commands For information about setting the current date and time, see the <DATE> and <TIME> commands. For information about ANSI escape sequences, see the <ANSI.SYS> topic. *** <Syntax> <Examples> ---------------------------------------------------------------------------- PROMPT--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. Defining the MS-DOS command prompt in Windows If you use Microsoft Windows 3.1, you can change the command prompt with the WINPMT environment variable. For example, suppose you want the following message to precede the MS-DOS command prompt: Type "exit" when you're ready to return to Windows. To display this message, include the following command to your AUTOEXEC.BAT file: set winpmt=Type "exit" when you're ready to return to Windows.$_$p$g *** <Syntax> <Notes> ---------------------------------------------------------------------------- PROMPT--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. *** ---------------------------------------------------------------------------- <Top of page>
Last update: December 07, 2002 14:45 by Content © 1997 Microsoft Corporation All else © 2000-2005 |