General discussion

Locked

Question about MSDOS

By rmdennis ·
It has been awhile since I have used all of the DOS commands and I am teaching a tech class at the local high school. I recently ran into a question I can not seem to find the answer for. what does the "$" sign do in MS DOS???

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to Question about MSDOS

in dos itself, nothing.
in a batch file, or command sequence, it signivies a system variable, such as path=$p $g
where $p is the current directory path
and
$g is the > symbol

Collapse -

prompt /?

by Jessie In reply to

If you type "prompt /?" in a command window, you will get the $ options available to you in your OS, something like this:

Prompt can be made up of normal characters and the following special codes:

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

If Command Extensions are enabled the PROMPT command supports
the following additional formatting characters:

$+ zero or more plus sign (+) characters depending upon the
depth of the PUSHD directory stack, one character for each
level pushed.

$M Displays the remote name associated with the current drive
letter or the empty string if current drive is not a network
drive.

Collapse -

Want to see a prompt$...

by tbragsda In reply to prompt /?

verbatim

This is my prompt string, for anyone who realy is a dos fan;
PROMPT [s[;H[0;32;44m[KTime: $t Date: $d Dir: $p[u[0;32;40m$p$g[0;37;40m

Saves cussor location
goes to 0,0
changes color to Blue/Green
Time Date and Dir
Return to old location
changes back to Green/black

TBR

Collapse -

hey

by Jaqui In reply to Want to see a prompt$...

I was just using that as an example of what $ is used for in dos.

scary thing is I remember that, and have been linux for a decade.

Back to Community Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums