title: Remove leading zeros in batch file
body: <p>In my application, I get a number having leading zeros. I am trying to trim the leading zeros and get the actual number. I tried using <code>/a</code> switch which considers right side of the assignment as an arithmetic expression. So I tried:</p>
  
  <pre><code>SET /a N = 00027
  </code></pre>
  
  <p>The above gave me the output of <strong>23</strong> which is the decimal equivalent of octal number <strong>27</strong>. Then I found <a href="https://groups.google.com/forum/?fromgroups=#!topic/alt.msdos.batch.nt/WbUgca7IBsU" rel="noreferrer">this solution</a> online.</p>
  
  <pre><code>SET N = 00027
  SET /a N = 1%N%-(11%N%-1%N%)/10
  </code></pre>
  
  <p>This seems working and is giving the output <strong>27</strong>. Is there much easier way to trim the leading zeros in a batch file?</p>