Jump to content
anggwaponi

using DOS command for batch file

Recommended Posts

hi all

need help or workaround regarding some short DOS programs using batch files 😇

actually, it's about adding some colors in a batch file i created in which i think i have achieved switching color every after IP address icon_cool.gif 

however, my problem it will completely changed the color of the previous IP address being ping using the now present color-assigned to the current IP address icon_confused.gif

i just want is to retain the color of the previous IP address being ping icon_redwine.gif 


@echo off
:beginning

ping -n 7 24.120.201.37 

color 9

ping -n 7 24.120.201.38 

color 3

ping -n 7 24.120.201.49 

color 6

goto beginning

Share this post


Link to post
Share on other sites

If you're using Windows 10, it looks like you can change colors by sending an actual escape character followed by a sequence:

https://stackoverflow.com/questions/2048509/how-to-echo-with-different-colors-in-the-windows-command-line/38617204#38617204

Share this post


Link to post
Share on other sites

hello justsomeguy 😉 and hi davej ☺️ 

at the moment, i'm using Windows 7 in which it's the reason i'm more into DOS commands 😐 

 

i just need to finish this program so at least i have my own customize monitoring system lol 😎

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...