1 flat input file contains ip addresses :
2 audit files
todo: read each ip address in and attempt ping. Log result into a log file containing current address then write contents out to a log file containing all entries .
What i get is all addresses wrtitten out to control file out.txt but only the result of the last ping to the control file pinglog.txt which would assume, the shell command is only being passed once.
Private Sub Command1_Click()
Dim objname As String
Open "C:\wip\adlist.txt" For Input As #1
Open "C:\wip\out.txt" For Output As #2
Open "C:\wip\pinglog.txt" For Output As #3
Do While Not EOF(1)
Input #1, objname
Print #2, objname
retval = Shell("cmd /c c:\windows\system32\ping.exe " & objname & " -n 10 >> c:\wip\pinglog.txt", 0)