Changes the Cmd.exe prompt. Used without parameters, prompt resets the command prompt to the default setting, the current drive letter followed by the current directory and a greater-than symbol (>).
prompt [text]
text : Specifies any text and information you want included in your system prompt.
/? : Displays help at 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 Windows XP version number. | ||||||||||||||||||||||||||||||||||||
| • | The following table lists the character combinations you can include instead of, or in addition to, one or more character strings in the text command-line option. The list includes a brief description of the text or information that each character combination adds to your command prompt.
| ||||||||||||||||||||||||||||||||||||
| • | When command extensions are enabled (that is, the default) the prompt command supports the formatting characters listed in the following table.
| ||||||||||||||||||||||||||||||||||||
| • | If you include the $p character in the text parameter, your disk is read, after you enter each command, to determine the current drive and path. This can take extra time, especially for floppy disk drives. |
The following example sets the command prompt to display the current drive and path followed by the greater-than symbol (>):
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
| Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |