title: Network latency monitoring script windows
body: <p>I'm trying to write script which will run ping command and from output it will get average latency and % of packet loss values, i tried with below command which works well </p>
  
  <pre><code>`ping -n 8 4.4.4.4  &gt; D:\latency.txt
  
  C:\Users\tnt5273&gt;ping 4.2.2.2
  
  Pinging 4.2.2.2 with 32 bytes of data:
  Reply from 4.2.2.2: bytes=32 time=253ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=242ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=252ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=248ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=253ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=242ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=252ms TTL=54
  Reply from 4.2.2.2: bytes=32 time=248ms TTL=54
  
  Ping statistics for 4.2.2.2:
      Packets: Sent = 8, Received = 8, Lost = 0 (**0% loss**),
  Approximate round trip times in milli-seconds:
      Minimum = 242ms, Maximum = 253ms, Average = **248ms** `
  </code></pre>
  
  <p>However challenge here is i want to somehow grab just numerical vales from output(so threshold can be set) and publish them in plain text file as
  Loss value in% Average value in ms 
  0 248</p>
  
  <p>, I'm not sure how to do it in windows, looking for help in VB or windows shell scripting  which can help me to achieve my objective  </p>
  
  <p>TIA</p>