I would like to run pathping and tracert style commands, and grab specific parts of the date out, does anyone know how to obtain this type of info using a script?
Here's a piece of code that outputs a tracert command to a file and then reads the contents.
Regards,
mapman04
===================
Dim oShell,txt1,fso,ln1,str1
Set oShell = WScript.CreateObject ("WSCript.shell"
oShell.run "cmd /C CD C:\ & TraceRT 10.10.3.230>C:\Temp\TraceRT.txt",0,true
Set fso = CreateObject("Scripting.FileSystemObject"
Set txt1 = fspenTextFile("C:\Temp\TraceRT.txt",1)
Do While txt1.AtEndOfStream = False
ln1 = txt1.Readline
str1 = Mid(ln1,9,1)
If str1 = "*" Then
MsgBox "IP Address is not valid!",64,"TraceRoute"
Exit Do
End If
Yeah you could also ues ping 192.xxx.xxx.xxx > filename.txt to write it to a file, but I was only after specific information so I can write them to a log file
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.