Change the style of the DOS prompt (C:\)

1 January 2000 by Snakefoot | Comment » | Trackback Off
The prompt is usually specified in AUTOEXEC.BAT and the standard prompt "c:\>" is :

prompt $p$g

Command Effect
$t current time
$d current date
$p current path
$n current driveletter
$v current version
$e escape character
$h backspace character
$_ newline character
Command Effect
$g >
$l <
$q =
$$ $
$b |
$a &
$c (
$f )
With these characters one can create an individual prompt:

prompt time is: $t$_date is: $d$_path is: $p$g

If one loads ANSI.SYS in the CONFIG.SYS then the prompt is also capable of changing colors by using escape sequences "$e[" (Here Bright Red and Green).

prompt $e[1;31;40m$p$g$e[1;32;40m

More Info MS KB Q83064
More Info MS KB Q135484 (Escape Sequences & Color Codes etc.)

Tags:
Category:

Updated: 24 September 2007

Leave a comment


You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>