我知道有各种颜色的echo声明,但我还没有让它适合我。我想让ping结果的行有不同的颜色。有办法吗?
这是我在网络上ping IP地址的代码。任何建议都会有所帮助。
@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