0

I know there are variations of coloring echo statements but I have yet to get it to work for me. I want to have the line of the ping result a different color. Is there a way to do it?

Here is my code for pinging the IP addresses on my network. Any suggestions would be helpful.

@echo off
COLOR 4f
ECHO OFF
set /P ip=Enter last 2 quadrants of your ip (PC Number) separated with a (.) : %=%
PING -n 2 10.1.%ip%
PING -n 2 10.2.%ip%
PING -n 2 10.3.%ip%
PING -n 2 10.4.%ip%
PING -n 2 10.5.%ip%
PING -n 2 10.6.%ip%
PING -n 2 10.7.%ip%
PING -n 2 10.8.%ip%
ECHO All done pinging. Press any key to exit. 
PAUSE 
Monacraft
  • 6,510
  • 2
  • 17
  • 29
JoeMarvel
  • 41
  • 8

1 Answers1

0

I believe what you are looking for can be found here. This code was made by jeb.

As for using it for your scenario, I am guessing you could either piping the ping commands or redirecting the output to a file and then using this code to read the file and change the colors.

Community
  • 1
  • 1
Monacraft
  • 6,510
  • 2
  • 17
  • 29