title: Batch file - loop ping - output to file hosts that are up
body: <p>I would like to make a .bat file that will do a for loop like below:</p>
  
  <pre><code>@echo off
  FOR /L %%G IN (1, 1, 69) DO (
      ping -n 1 192.168.%%G.3 
      ping -n 1 192.168.%%G.4
  )
  </code></pre>
  
  <p>Then look through the output and send only the IPs that replied successfully to the ping to a txt file.  Is this possible with a CMD batch file?</p>