title: Divide by zero error in while executing the batch file
body: <p>I wrote a batch script to count number file in directory. after that i need to assign the same value to a variable.</p>
  <pre><code>@for /f %%a in ('2^&gt;nul dir &quot;C:\Users\robert\Desktop\Resouces&quot; /a-d/b/-o/-p/s^|find /v /c &quot;&quot;') do set n=%%a @echo Totalfiles: %n%.
  
  set /A &quot;{$temp.DataTask1[1]/inout[1]/p_FileName}=%n%&quot;
  </code></pre>
  <p>But this throws divide by zero error. Kindly let me know my mistake here. {$temp.DataTask1[1]/inout[1]/p_FileName} is name of the variable.</p>