title: Writing Batch file that monitors a certain web page's status
body: <p><strong>The issue</strong></p>
  
  <p>I am trying to create a batch file that will execute the following two commands:</p>
  
  <pre><code>cd /some/path
  
  dotnet run
  </code></pre>
  
  <p>that produces the following output:</p>
  
  <p><a href="https://i.stack.imgur.com/z3vKP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z3vKP.png" alt="Output"></a></p>
  
  <p>It starts my localhost server.</p>
  
  <p><strong>Trying To Accomplish</strong></p>
  
  <p>What I would like to do is, put those two commands in a batch file and automatically open Chrome to the server address, HOWEVER, the dotnet command takes some time to finish. So somehow, I would have to keep monitoring localhost to see if it is available.</p>
  
  <p>Any help would be appreciated. Although opening a CMD window, typing those 2 commands, and waiting a minute isn't all that much of a problem, it sure would be nice to just click on a batch file.</p>
  
  <p>Thank you.</p>