Computer and Software Support

DOS Command Prompt

Type: Internal (2.0 and later)



PROMPT [prompt text][options ]

Purpose: Changes the DOS command prompt.



You can change the DOS prompt (the indicator that DOS is ready for input) to almost any type of special prompt you want. For example, you can use this command to make the prompt display the current time, the date, or the current directory. You can also use combinations of the special prompt characters to create custom prompts.

If you use the PROMPT command with no options , the prompt will be set to the default prompt (the current drive letter and a greater-than symbol). By using the characters indicated in the following list, you can create a great variety of prompts (each must be preceded by a dollar sign):



To change the prompt to display the current drive and directory and a greater-than symbol, enter

prompt $p$g

You can also create more complicated prompts. For example, to use the same prompt as above, with two added spaces and the characters TIME= followed by a display of the current time, enter

prompt $p$g TIME=$t

The resulting prompt (if you are working in the DOS directory on drive C) will look like this:

C:\DOS> TIME=11:07:54.23

This page is from I pasted it on my website to avoid possible broken links. For further help with DOS commands, Check out.