title: Comparing two number in batch script
body: <p>I'm sorry if it seems a very basic question, but I cant compare two file sizes where one file is being written continuously in batch script, it doesn't go beyond if statement, just get stuck there and comes out without doing anything.</p>
  
  <pre><code>:START
   copy C:\Users\Admin\ping.txt C:\Users\Admin\ping.partial
   set file="C:\Users\Admin\ping.txt"
   set parfile="C:\Users\Admin\ping.partial"
   ping -n 5 127.0.0.1 &gt; nul
   FOR %%A IN (%file%) DO set size=%%~zA
   FOR %%B IN (%parfile%) DO set parsize=%%~zB
   echo %size%
   echo %parsize%
   if %size% EQU %parsize%
   (
     ECHO file is complete &gt; C:\Users\Admin\status.log
     ping -n 5 127.0.0.1 &gt; nul
   )
   else 
   (      
    echo incomplete &gt; C:\Users\Admin\status.log
    ping -n 5 127.0.0.1 &gt; nul
     goto start
     )
  </code></pre>
  
  <p>What I'm doing wrong here. :(</p>
  
  <p>Regards,
  Gaurav</p>