Windows prompt

The prompt command changes the command prompt Cmd.exe file.

The prompt command changes the command prompt Cmd.exe file. If used without parameters, the prompt will reset the command prompt to the default settings, this default setting is the current drive letter and the directory followed by the larger symbol (>).

Syntax prompt command

 prompt [] 

Parameter command prompt

Parameters

Describe

 

Specify the text and information you want to attach in the command prompt.

/?

Show help at thecommand prompt.

Note the prompt

You can customize the command prompt to display any text you want, including information such as the name of the current directory, date and time, and the version number of Microsoft Windows.

The following table lists the matching characters that you can attach instead, or attach external one or more character strings in the < Text > parameter.The list includes a brief description of the text or information that each combination character will add to your command prompt.

Characters

Describe

$ q

= (equals sign)

$$

$ (dollar sign)

$ t

The present time

$ d

Today

$ p

Current drive and path

$ v

Version number of Windows

$ n

Current drive

$ g

> (bigger mark)

$ l

<(smaller mark)

$ b

$ _

Move to the next line

$ e

ANSI exit code (code 27)

$ h

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

$ a

& (ampersand)

$ c

((left and right brackets, brackets)

$ f

) (right parentheses, close brackets)

$ s

Space

When command extensions are enabled (set as default) the prompt command supports the following character formats:

Characters

Describe

$ +

Number 0 or plus sign (+), depending on the depth of the pushd directory stack (each character corresponds to a level).

$ m

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

If you attach the $ p character in the < Text > parameter, your disk will be read after you enter each command (to determine the current drive and path).This can consume a bit more time, especially with floppy drives.

Example prompt command

To put the two command prompt along with the current date and time on the first line and the bigger sign in the next line, enter:

 prompt $ d $ s $ s $ t $ _ $ g 

The command prompt is changed as follows (where the date and time is the time and date when the command was placed):

 Fri 06/01/2007 13:53: 28.91 

>

To set the command prompt to display as an arrow (->), enter:

 prompt - $ g 

To change the command prompt to manually set the default setting (the current drive and path followed by the larger one), enter:

 prompt $ p $ g 

See more:

  1. Prnport command in Windows
  2. Prnmngr command in Windows
  3. The prnjobs command in Windows
  4. Prndrvr command in Windows
5 ★ | 1 Vote