title: How to generate 4 digit random numbers in a batch file?
body: <p>please give me the code for generating 4 digit random number in dos (batch) file</p>
  
  <p>i tried </p>
  
  <pre><code>set /a num=%random% %%10000 +1
  </code></pre>
  
  <p>but this is not giving exactly 4 digit number every time. so please help me.</p>