title: Process "Tracert" output for IP addresses (Batch)
body: <p>I'm using <strong>batch</strong> and I need to process <code>tracert</code> output to grab <strong>only IP Addresses</strong>. How can I do this?</p>
  
  <p>I can say that the <code>for</code> command is used and thankfully I have a little experience with <code>for</code>.</p>
  
  <p>Since we're obviously going to use delimiters, and since there's the <code>ms</code> word with the IP next to it, shouldn't I be doing</p>
  
  <pre><code>for /f "tokens=2 delims=ms" %%a in ('tracert google.com') do echo set %%a=ip&amp;echo ip&gt;ips.txt
  </code></pre>
  
  <p>Since <code>ms</code> is delimiter, the IP addresses should be processed, right?</p>
  
  <p>Instead, I get this really weird output:</p>
  
  <p><img src="https://i.stack.imgur.com/pdiN2.png" alt="img"></p>
  
  <p>BTW, this is how it looks like when I do the traditional <code>tracert</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/iWfLp.png" alt="enter image description here"></p>