Quincy Center for Technical Education
Computer Technology Department

Customize Your DOS Prompt

We can customize our command prompt by utilizing these special codes in the prompt line. The most common syntax is, prompt $p$g, which returns the following: A:\>


Using the prompt commands below, experiment using each function separately or together.


Prompt commandDisplays
$$$, dollar sign character
$b|, pipe character (located to the upper right on the keyboard)
$dthe date (according to the system clock)
$ethe ESCAPE character
$g>, the greater- than character
$hbackspace (erase previous character)
$l<, Less-than character
$nThe logged disk drive character
$pThe logged disk drive and subdirectory
$q=, equal-sign character
$tthe current time (according to the system clock)
$vDOS version
$_Carriage return/linefeed (new line)


Additional batch file commands
Batch commandsDisplays
@echo onreturns line to the screen (default)
@echo off does not return line to the screen
break onEnables break function, stops execution of
commands in batch files and other commands
when CTRL+C is pressed.
break offDisables the break function (default)