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

This question already has an answer here:

I often find myself end up with several cmd windows which I need to be open for several days at a time.

When I hover on the clumped cmd icon in task bar (in windows 7), it shows me something like this (see screenshot below):

How it looks on my task bar

All those CMDs have different current directory. I always have to do a hit-and-trial to restore every window to find the one where I want to work. If after restoring, its not the intended one, then I minimize it and restore next. Rinse and repeat. Its quite counter-productive.

What I would prefer is that instead of useless information like "Administrator: C:\Windows\system32\cmd.exe", it should show the current duirectory that cmd is in.

Is there a way do achieve this?

share|improve this question

marked as duplicate by random Feb 16 '13 at 23:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Have you considered wrapping CMD in Console2, which will give you tabs in a single window? That would make running so many instances much easier. You could do the same with TCC/LE, which I find much better than CMD. – paradroid Feb 15 '13 at 19:05
You might want to check out this solution provided in here. It's pretty much straightforward and suits your needs i think. – whatever Feb 15 '13 at 19:17
Check out this question also: The idea is to use ANSI escape sequences in prompt, but you need to use ANSI "processor" - ConEmu or AnsiCon. – Maximus Feb 15 '13 at 21:27

Within the command window, use the TITLE command.

  TITLE [string]

  string  The title for the command prompt window, up to 243 characters.
share|improve this answer

You can make the Command Prompt change its title whenever the working directory changes.

For example, to achieve this when using cd to change directories, define the following macro

doskey cd=cd C:\cd.bat $*

and create a batch file (C:\cd.bat) containing the following:

@echo off

cd %*

title %cd%

If you write similar files for pushd and popd (just replace cd), you can create a batch file (e.g., C:\macros.bat) that sets the title to the current location and defines macros for cd, pushd, popd and the X: command:

@echo off

title %cd%

doskey cd=C:\cd.bat $*
doskey popd=C:\popd.bat $*
doskey pushd=C:\pushd.bat $* 

for %%b in (A B C D E F G H I J K L M N O P Q R S T U V V X Y Z) do @doskey %%b:=C:\cd.bat /D %%b:

To get a Command Prompt with these macros, either invoke it like this:

cmd /K C:\macros.bat

or create a String value with Name AutoRun and Data C:\macros.bat in the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
share|improve this answer

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