Dos Prompt Home Page Command Prompt Reference
PROMPT

Changes the cmd.exe command prompt.

PROMPT [text]

text Specifies a new command prompt.

Prompt can be made up of normal characters and the following special codes:

$A     & (Ampersand)
$B     | (pipe)
$C     ( (Left parenthesis)
$D     Current date
$E     Escape code (ASCII code 27)
$F     ) (Right parenthesis)
$G     > (greater-than sign)
$H     Backspace (erases previous character)
$L     < (less-than sign)
$N     Current drive
$P     Current drive and path
$Q     = (equal sign)
$S     (space)
$T     Current time
$V     Windows version number
$_     Carriage return and linefeed
$$ $ (dollar sign)

If Command Extensions are enabled the PROMPT command supports the following additional formatting characters:

$+         zero or more plus sign (+) characters depending upon the
depth of the PUSHD directory stack, one character for each
level pushed.

$M         Displays the remote name associated with the current drive
letter or the empty string if current drive is not a network
drive.

Notes

Prompt alone returns to the default.

Examples

prompt $D

Associated Commands

TITLE ; CMD

 

Top of the Page - Command Prompt Reference Home Page
Last Page Update: 08/03/2012

© Sembee Ltd. 1998 - 2024.

Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions.

All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.

Sembee Ltd. is registered in England and Wales at 1 Carnegie Road, Newbury, Berkshire, RG14 5DJ.
Registered company number: 4704428. VAT Number GB 904 5603 43.

Server 1