Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I go to a deep directory in MS Windows cmd, the prompt is too long since it show the full name of the working directory.

How to make it hide the directory name or at least part of it?

share|improve this question
up vote 7 down vote accepted

prompt $g will replace the long path with a beautiful

>

You can also customize it as you wish, type prompt /? for help.

share|improve this answer
5  
prompt will return the prompt back to it's normal state after you've changed it. :) – iglvzx Jan 30 '12 at 6:20

@Revolter's answer is the cleanest. You can also use the subst command to associate a path with a drive letter. For example, subst x: . will associate the x: drive with the working directory. Next, enter x: to switch to your 'new' working directory. This helps tidy up the command prompt. subst x: /d will delete the association. subst by itself will show all your pairings.

share|improve this answer

You must log in to answer this question.

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