title: How to run command until it succeeds?
body: <p>I still use Windows batch-files for basic tasks. One of these is to check my internet connection (pg.bat) which does only do a <code>ping www.google.com</code></p>
  
  <p>Most of the time, I need to run it a few times until it succeeds (host could not be found error). At first I thought a <code>ping -t</code> would work, but it does not. When the host is not found, it stops right away.</p>
  
  <p>How can I run pg.bat until the ping succeeds? (i.e at least one of the default 4 pings works)</p>