Saturday, September 29

Altering the Prompt

PROMPT
The PROMPT instruction changes the form of the system prompt.
  • the standard form of system prompt displays the drive letter along with greater than sign (e.g. A>)
  • Prompt can be made informative by adding date, time or a chosen text etc. (e.g. Mon 07/08/96 12:56:33>)
  • The appearance of the system prompt may differ according to the suppliers of the system.
Syntax
PROMPT $x[$x]....
Where,
PROMPT : without parameters, the operating system will continue using the standard prompt.
$               : A dollar sign, the beginning of the code of a parameter.
Without $ sign, the character will be shown literally as text.
X : A character from the following list
D : Date
T :  Time
P :  current driectory of current drive
N :current drive
V : version of MS-DOS
G : >, "Greater than" symbol
L :<,"smaller than" symbol 
B : Pipe symbol
Q : =, equal sign
H : Back on space and delete previous symbol.
E : Escape sign
Example 1
C:\>PROMPT (pres enter key)
It changes to the system prompt to C>
Example 2
C:\>PROMPT $P$G (press enter key)
It changes system prompt to C:\>
Example 3
C:\>PROMPT $D $T$G (press enter key)
It changes to the system prompt to date, and time as :
Mon 07/08/96 12:56:33 

No comments:

Post a Comment