SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Computer Learning

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Esteban who wrote (20898)6/21/2001 10:24:45 PM
From: PMS Witch  Read Replies (1) of 110652
 
You're correct. The DOS prompt often contains the > character.

In DOS, the prompt can be selected by using the PROMPT command or the SET command.

Examples...

PROMPT=$p$g

This gives a prompt with the default directory path ($p) followed by the >, or greater sign ($g). The symbols beginning with $ are necessary because DOS will interpret them as part of the command instead of part of the desired prompt.

$Q = (equal sign)
$$ $ (dollar sign)
$T Current time
$D Current date
$P Current drive and path
$V Windows version number
$N Current drive
$G > (greater-than sign)
$L < (less-than sign)
$B | (pipe)
$H Backspace (erases previous character)
$E Escape code (ASCII code 27)
$_ Carriage return and linefeed

Type PROMPT without anything else to reset prompt to its default value.

The same effect can be achieved with the SET command.

Example...

SET PROMPT=It's now $T $H$H$H$H$H$H$H $G

This will give a prompt looking like this:

It's now 10:24 >

The text gets included as given, the $T prints the time, and the $H backspaces one character. Seven $H are used to backspace out the seconds and second fraction part of the time.

PROMPT /? will display the command's help.

Cheers, PW.

The $E, or ESC character can be used when the ANSI.SYS driver is loaded to further customize the prompt's appearance. (Custom colours comes to mind.)
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext