Computing.Net > Forums > Disk Operating System > dos color in batch file?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

dos color in batch file?

Reply to Message Icon

Name: jim
Date: March 28, 2002 at 10:54:52 Pacific
Comment:

Hi,

Is it possible to added text color in echo commands in a batch file. Can you give me url or commands to do so.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: ASHLEY4
Date: March 28, 2002 at 15:00:58 Pacific
Reply:

Hi
first you need ANSI.SYS in your config.sys
like
DEVICE=C:\DOS\ANSI.SYS
Then you can make a text call bluescrn.txt in it put
ESC[0;37;44M
If you now use the type command as follows
type bluescrn
your screen should be set to write in white on blue background.you may have to do a cls toget it all blue.
the 0 sets the attributes to none,the 37 sets the foreground to white and the 44 sets blue as background color.
if you put type bluescrn in a batch file it will do the color for you.
forgrd color (30)black (31)red (32)green (33)yellow (34)blue (35)magenta (36)cyan (37)white
and for backgrd in same oder 40 41 42 43 44 45 46 47.
I hope this helps

ASHLEY4.



0

Response Number 2
Name: Ayexby
Date: March 28, 2002 at 15:35:51 Pacific
Reply:


Here is another method. You would need to download "Dos Colors", either the exe or the batch file version.
This version is not as capable as the ansi.sys method mentioned above because ansi.sys will allow you to color individual characters, But I think this is a bit easier to use. You would just have to set the colors by whole lines.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: dos color in batch file?

DOS menu in batch file www.computing.net/answers/dos/dos-menu-in-batch-file/9382.html

Suppress Or Hide Dos Screen In Batch File www.computing.net/answers/dos/suppress-or-hide-dos-screen-in-batch-file/5434.html

user imput in batch files. www.computing.net/answers/dos/user-imput-in-batch-files/3282.html