Windows XP Tips, Tricks, Settings and more ...

MCSE Training Courses / Cisco Training Courses

Desktop/   Email/   Internet Explorer/   MSDos/   Networking/   Printer/   
Registry/   Windows 2000/   Windows 98/   Windows ME/   Windows NT 4.0/   Windows Vista/   Windows XP/

Change the DOS Prompt Color in a Batch File

In Category: MSDos

The COLOR command changes the colors of the DOS prompt text and (optional) background. COLOR takes a one or two-character argument. With one character, you can specify the text color. With two characters, the first character specifies the color of the background, and the second character the text color. The characters and colors are as follows: 0 = Black 1 = Blue 2 = Green 3 = Aqua 4 = Red 5 = Purple 6 = Yellow 7 = White 8 = Gray 9 = Light Blue A = Light Green B = Light Aqua C = Light Red D = Light Purple E = Light Yellow F = Bright White For example, if your batch file needs to report an error condition, consider making the command prompt background red, and show the text in bright white. The following does the trick: COLOR 4f Note that you are not allowed to set the foreground and background colors the same. Trying to do so will cause the COLOR command to ignore your parameters. From within a batch file, the ERRORLEVEL will be set to 1. To reset the colors to the default, just enter the COLOR command without any parameters.

 

Try Registry Tools
 1. Registry Easy - #1 All In One Registry Fix & System Optimizer Suite!
 2. RegSWEEP #1 Converting Registry Cleaner. Ms Vista Certified
 3. Registry Toolkit - Registry Cleaner Tool
 4. New* Fast PC Secrets - Eliminate Slow Computer Problems 13 Vids
 5. PC-Cleaner Top Registry Cleaner
 6. Registry Care

FREE Learn English - Food
Speak Englsih - Drinks
Copyright 2007 - RCS Limited. Terms & Conditions