Guides:Shells/COMMAND.COM-CMD.EXE/DOS Commands/PROMPT

From CoderGuide

Jump to: navigation, search

Return to: Guides:Shells/COMMAND.COM-CMD.EXE/DOS Commands

PROMPT

Format:

PROMPT prompt options
PROMPT $p$g 

Changes the prompt to something different. The defsult prompt in DOS was:

drive-letter>
C>

Since setting the prompt to "$p$g", it became the default prompt inater versions of COMMAND.COM/CMD.EXE, so now the defalt prompt looks like:

drive-letter:path>
C:\WINDOSEZZZ>

Format codes:

$Q= (equal sign)
$$$ (dollar sign)
$TCurrent time (updates only after you hit "enter" for a new command prompt)
$DCurrent date (updates only after you hit "enter" for a new command prompt)
$PCurrent drive and path
$NCurrent drive
$G> (greater-than sign)
$L< (less-than sign)
$B&pipe; (pipe)
$HBackspace (erases previous character)
$EEscape code (ASCII code 27), useful for colorizing prompt using ANSI codes.
$_Carriage return and linefeed
Personal tools