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




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.



$ q

= (equals sign)


$ (dollar sign)

$ t

The present time

$ d


$ 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


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



$ +

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:

  • Prnport command in Windows
  • Prnmngr command in Windows
  • The prnjobs command in Windows
  • Prndrvr command in Windows
Thanks for reading the post

Windows prompt

Please share this article to your friends
« The date command in Windows
The difference between 2.4GHz and 5GHz Wi-Fi »