title: Find IP of computer, find IPs of all computers on LAN
body: <p>I know how to find a computer's IP address, but how do I make a variable set as the IP address of that computer, or save it to a text file, all in a batch? </p>
  
  <p>Also, I found a line of code on the internet that would ping every possible IP address of a given server and list the IPs successfully pinged, but it didn't work; they all timed out. What would be wrong with it? Is there a better way to do it? So here's the code for that:</p>
  
  <pre><code>FOR /L %i IN (1,1,254) DO ping --a --n 1 10.0.1.%i | FIND /I "Reply"&gt;&gt; c:\lanipaddresses.txt
  </code></pre>
  
  <p>Thanks!</p>