Shortening Windows 10 command prompt
By Emma Terry •
I'm trying to figure out how to shorten the prompt in Windows 10 so I don't end up with a deeply nested directory path taking up most (or all) of the command line.
I've tried applying the information shown here, but it doesn't seem to translate correctly to Windows 10. I created a new environment variable named PROMPT and filled in the applicable info, but it doesn't seem to have the desired effect - it just moves the > down one line; still has the long path.
1 Answer
C:\Program Files\Internet Explorer\en-US>PROMPT=$N$G$S
C> ver
Microsoft Windows [Version 10.0.10586]
C>How do I make that stick?
Easy way
C> setx PROMPT $n$g$s
SUCCESS: Specified value was saved.Then close and reopen command prompt.
Hard way
Win+Break, "Advanced System Settings", "Environment Variables" ...
Note:
The prompt text 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) $M Display the remote name for Network drives $N Current drive $P Current drive and path $Q = (equal sign) $S (space) $T Current time $V Windows NT version number $_ Carriage return and linefeed $$ $ (dollar sign) $+ Will display plus signs (+) one for each level of the PUSHD directory stack 3