title: How to check if a parameter (or variable) is a number in a Batch script
body: <p>I need to check if a parameter that is passed to a Windows Batch file is a numeric value or not. It would be good for the check to also works for variables.</p>
  <p>I found an <a href="https://superuser.com/a/404359">answer</a> to a similar <a href="https://superuser.com/q/404338">question</a>, where the <code>findstr</code> command is used with a regular expression.</p>
  <p>I did try that solution, but it’s not working like I hoped (at least on Windows 7).</p>
  <p>My test scenarios are as follows:</p>
  <pre><code>AA  # not a valid number
  A1  # not a valid number
  1A  # not a valid number
  
  11  # a valid number
  </code></pre>