Followers 0

Ping a series of computers

4 posts in this topic

#1 ·  Posted (edited)

I want to ping a series of computers from 10.0.0.1 to 10.0.0.10 (for example) and pipe the results to a text file.

For $4oct = 1 to 10 run ("ping 10.0.0.$4oct >> c:\text.txt")

Next

Exit

The above would just get me 3 cmd line screens, but no pinging.

How would you do this in AutoIt?

Edited by autoitNOW

Share on other sites

Try like this:

For $4oct = 1 to 10 run ("ping 10.0.0." &$4oct)
Next
Exit

Share on other sites

#3 ·  Posted (edited)

Try like this:

For $4oct = 1 to 10 RunWait(@comspec & " /c ping 10.0.0." &$4oct & ">>File.txt","",@sw_hide)
Next

Exit
Edited by ezzetabi

Oh.... thanks.