Glam Prestige Journal

Bright entertainment trends with youth appeal.

I'm trying to start a command prompt via a batch file, echo some text, and change the title of the command prompt. I'm trying:

start cmd
/k echo This is a terminal
/k title Terminal

The echo text displays, but not the title text.

4 Answers

The TITLE command works for me.

start cmd
TITLE Test
PAUSE

Edit: I believe the syntax for /k is

cmd /k "TITLE Test"

Silly me, I've found what I needed.

Doing

start "title here"

will do a title for the wanted program. From there, it is just

start "Terminal" cmd /k echo This is a terminal

If you want to run multiple echos / other commands, do

start "Terminal" cmd /k "echo this is one echo command & echo this is another"

where you separate each command input with &

2

You could use the following:

start cmd /k "echo this is a terminal & title Terminal"

The ampersand allows you to put multiple commands on one command line - see Command shell overview.

I recommend using start "Terminal Name Here" C:\Windows\system32\cmd.exe because it only opens 1 window while start "Terminal" cmd /k echo This is a terminal will keep opening windows over and over again until it is forced to stop IF you name it cmd.cmd or cmd.bat.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy