windowscmdprompt

How do I change the command-line prompt in Windows?


How do I change the command-line prompt into a console?

I've been looking in the console functions API, but I could not find anything for it.


Solution

  • There's the PROMPT environment variable:

    set PROMPT=$P$G
    

    $P$G is the default value, giving you the usual C:\> type output. There are more format variables available here.