MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
January
Sun Mon Tue Wed Thu Fri Sat
       
22
2015
Months
Jan


Thu, Jan 22, 2015 10:35 pm

Changing the title of a command prompt window

If you open a command prompt window on a Microsoft Windows system, the title for the window will be "Command Prompt".

Command Prompt window

If you have several command prompt windows open, you might like to have each uniquely identifiable by a distinct title, so that you can easily select the relevant one. You can use the title command to change the title that appears at the top of a command prompt window. The syntax for the command is as follows:

C:\>title /?
Sets the window title for the command prompt window.

TITLE [string]

  string       Specifies the title for the command prompt window.

E.g., you could change the title to Test with title Test.

Command Prompt window

You don't need to include text in quotes after the title command if the text contains spaces. E.g., you can use title Mary had a little lamb to have the title appear as Mary had a little lamb. If you put quotes on the command line after the title, the quotes would appear in the window title.

If you give unique titles to the command prompt windows, you can also tell how much memory each one is using with the tasklist command by filtering on WINDOWSTITLE. E.g., if I had two command prompt windows open with one named "Mary had a little lamb" and another titled "Jack and Jill":

C:\>tasklist /fi "WINDOWTITLE EQ Mary had a little lamb"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
cmd.exe                      14020 Console                    1      2,696 K

C:\>tasklist /fi "WINDOWTITLE EQ Jack and Jill"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
cmd.exe                      11536 Console                    1      2,188 K

If the title you choose is very long, only part of the text may be displayed in the windows title with three dots substituted for the rest of the text that can't be fit into the available space for the title.

[/os/windows/commands] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo