I am not really doing a traceroute, just pinging some important points along the way. And I want more data than tracert gives.
>> the script pings several IPs on our way to the internet, tells >> the user what is up and that is down > isn't that what traceroute/tracepath is for? windows comes with a > version called tracert.exe This is pretty cool. I wasn't even thinking this simple, but I can make that work, I think! > I haven't tested this, but it may work: > echo "EHLO yourmailserver.com" > email.dat > echo "MAIL FROM: Some User <[EMAIL PROTECTED]>" >> email.dat > echo "RCPT TO: Dusty <[EMAIL PROTECTED]>" >> email.dat > echo "Subject: Network Status" > echo . > tracert www.yahoo.com >> email.dat > echo "." >> email.dat > > telnet yourmailserver.com 25 < email.dat > Echo with a . prints a . so I am still looking for a way to print a blank line. >> don't know how to print blank lines to the screen in a batch file > I believe it's just echo followed by a period on a line of its own. > I figured out how to replace chars like this, but I wanted to delete the 15th character in line 12 or remove the 5 spaces at the begining of line 4. >> can't get EDLIN to delete single characters or spaces on a line. > .rS1^ZS2 > will replace all occurences of S1 with S2 (^Z is control-z). if you > omit the ^ZS2 then it will just delete all occurences of S1. > basically I repeat this: ping -n 1 %ROUTER_INTERNAL_INTERFACE% > %temp%\zzxyy003.tmp edlin %temp%\zzxyy003.tmp < %temp%\zzxyy001.tmp > nul fc /w %temp%\zzxyy002.tmp %temp%\zzxyy003.tmp > nul IF ERRORLEVEL 1 echo INTERNAL ROUTER INTERFACE (% ROUTER_INTERNAL_INTERFACE%) IS DOWN IF NOT ERRORLEVEL 1 echo INTERNAL ROUTER INTERFACE (% ROUTER_INTERNAL_INTERFACE%) IS UP nine times and just use different varables. There must be a way for me to write this once and have it run 9 times with the correct information? >> I repeat the exact same steps over and over and wanted to figure out >> how to remove the redundancy. > I don't understand this statement. > >> I have attached the script if anyone has any suggestions > [...] >