Setting the Title of the "DOS" Command Prompt from a Batch File
Sponsored By
Just a small reminder for myself and others that you can set the title of the Command Prompt Window with the "TITLE" Batch Command.
Since I'm building three different branches of our SDK during dev, it's nice to differentiate all these windows on all these monitors.
For example here's "mybuild.bat"
TITLE Building VoyagerFramework 2.0
set BUILDDIR=C:\dev\VoyagerFramework\build
call BUILD.BAT %1 %2 %3 %4 %5
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
I'm using 4NT as my command line processor, and I've set my prompt to "%@exec[@title %_CWDS][$r] $P$G". This way, the title of the console window displays always the current directory. It's very helpful if you have many console windows in your task bar.
...and afterwards you can set the color of the window according to the errorlevel to green/red, e.g. with color c0
:)
dominick
:)
dominick
Comments are closed.
Thanks for the tip. Man, you learn something new darn every day...