You are not logged in.
Pages: 1
How to display colored message using echo command (or something else) ?
but, without using resource kit or utility tools..
ex:
i want to display "Hello I'am Red" in color=RED
"Hello I'am Blue" in color=Blue
I try this but doesn't work :
@echo off
color 04
echo "Hello I'am Red"
color 09
echo "Hello I'am Blue"
pause>nul
Result:
both of them in Blue..
Last edited by Fen_Li (03 Jun 2007 20:11)
G-Smart thing Smart
Offline
Although it's not abundantly clear from it's help page, the "color" command addresses the entire screen only.
As far as I know there's no native way to change colours in a more precise manner.
cmd | *sh | ruby | chef
Offline
I don't think you can do that in the cmd shell, however if you use the new PowerShell in Vista or Win XP (free download) then you can do it with Write-Host:
Write-Host -ForeGroundColor Yellow "some text in yellow " -nonewline
Write-Host -ForeGroundColor Red "some more text in red"
Offline
Pages: 1