Sign in to follow this  
Followers 0
autoitNOW

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

An ADVOCATE for AutoIT

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Oh.... thanks.


An ADVOCATE for AutoIT

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0