Change the title displayed above the CMD window.

      TITLE [string]

   string   The title for the command prompt window, up to 243 characters.

The TITLE command is typically used in a batch file to give the script window a meaningful name.

The default title for the CMD shell is %comspec% however, since the title can be re-defined in a program shortcut, the title is typically set to "Command Prompt".

The START command, used to start a program in a separate window also has an option to specify a title for the new Window.

If you call a batch script in a new CMD session, then any TITLE set within the batch file will revert when the second CMD session ends.

  TITLE Some initial title text
  CMD /c MyBatchFile.cmd

TITLE is an internal command.


Set a title for the current session:

C:\> title Remember, all I’m offering is the truth. Nothing more

In a batch file, set the title to match the name of the batch file with:

@Echo off
TITLE %~nx0

"The longer the title, the less important the job" - George McGovern.

Related commands:

MODE - change the size of the CMD window.
COLOR - change the colour of the CMD window.
PROMPT - change the CMD window prompt.
START - start a program in a separate window.
Max length of the TITLE command - SS64 forum.
QuickEdit mode - also changes the title (temporarily).
Equivalent PowerShell: Set the console title to current working dir (save in Profile.ps1 to make permanent).

Copyright © 1999-2022 SS64.com
Some rights reserved