title: if else not working in batch script
body: <p>I'm new to the batch script. I added the if else in the batch script. 1st if else works once but not all the time, and the 2nd is not working all the time cant find the issue it, can some one help me in this
  I'm getting the Counter value by using the for loop.  </p>
  
  <blockquote>
  <pre><code>if %Counter% equ %SuccessCounter% (  
      echo List.csv,%Counter%,%SuccessCounter%,%date% %time%,True &gt;&gt; %statusfile%  
  ) else (
      set partUpload_flag=1    
      echo List.csv,%Counter%,%SuccessCounter%,%date% %time%,False &gt;&gt;%statusfile%
  )
  
  
  
  if %ErrorCounter% gtr 1 (    
      set success_flag=0
      set Attachment= %Attachment% -attach error.csv
      echo ERROR:Error found in Account records:%ErrorCounter% lines &gt;&gt; %logpath%
      ::Having error in account file
  )
  </code></pre>
  </blockquote>