PROMPT

The description below is from the book
DOS the Easy Way by Everett Murdock Ph.D.

CLICK HERE for information about downloading the book.

Type: Internal (2.0 and later)

Syntax:

PROMPT [prompt text][options ]

Purpose: Changes the DOS command prompt.

Discussion

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.

For more information about the many uses of the PROMPT command, see Chapter 6, Tips for Advanced Users, in the downloadable book DOS the Easy Way.

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):

Examples

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

For more information about this command, refer to the downloadable book DOS the Easy Way.



Copyright 1985 - 2008 by Everett Murdock




Back to the Easy DOS Command Index