Quincy Center for Technical Education
Computer Technology Department

Prompt

Changing the Windows 2000 command prompt (Cmd.exe)

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 2000 version number.

prompt [text]

Parameters

none

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 (>).

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, one or more character strings in the text parameter. The list includes a brief description of the text or information that each character combination adds to your command prompt.

Character

Description

$q

= (equal sign)

$$

$ (dollar sign)

$t

Current time

$d

Current date

$p

Current drive and path

$v

Windows 2000 version number

$n

Current drive

$g

> (greater-than sign)

$l

< (less-than sign)

$b

| (pipe)

$_

ENTER-LINEFEED

$e

ANSI escape code (code 27)

$h

Backspace (to delete a character that has been written to the prompt command line)

$a

& (ampersand)

$c

( (left parenthesis)

$f

) (right parenthesis)

$s

space

When command extensions are enabled (the default in Windows 2000), the prompt command supports the following additional formatting characters:

Character

Description

$+

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

$m

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