How to formally denote DOS/windows prompt? All kinds of *nixes use $ (# for root/admin) as shell prompt and what about DOS/windows? Is there any formal way to denote prompt in "DOS environment"?

I used sometimes \> but I'm not sure about that. Not about $ either as, for me, it "doesn't feel to fit".

  • A silly question: Is this for programming purposes or just curiosity (or both)? I'm interested, too.
    – user1019780
    Commented Mar 29, 2020 at 14:26
  • I was answering question and action was taking place in windows environment. I proposed command line solution but as it's windows/dos I was unsure what "standard" prompt to use. "Most of the time" command line stuff is part of *nix environment but sometimes it's used under windows which is different from *nix (philosophy) and has it's own "standard" of everything.
    – tansy
    Commented Mar 29, 2020 at 14:44
  • Well, maybe not in Windows but on other platforms, signs like the dollar sign have a specific use as wild-cards too, not as prefix, but as suffix in, say, a WiFi passphrase that won't work for some reason (I used it more than once in OS X), but in Wndows, it's different, because Microsoft is not really known for its strict adherence to POSIX stipulations, so...
    – user1019780
    Commented Mar 29, 2020 at 14:49

1 Answer 1


Is there any formal way to denote prompt in "DOS environment"?

No, however, there is a default prompt (that can be changed) which is $P$G.

This expands to drive/path followed by >, for example:


Source PROMPT - Windows CMD - SS64.com

PC DOS 1.0 did not have subdirectories or hard disks so the prompt would have been a> or b> if the user had two floppy disk drives.

If there were more than 2 floppy drives then the prompts would have included c>, etc.

Source DOS 1.0 and 1.1 | OS/2 Museum

MS-DOS 2.x introduced support for hard disk drives and subdirectories.

Source MS-DOS - Wikipedia

  • Seems like only option is c:\> as no one is going to know what c> or > is. Especially > is going to be perceived as redirect.
    – tansy
    Commented Mar 29, 2020 at 23:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .