title: if was unexpected at this time
body: <p>I am facing a compilation issue for <code>IF</code> condition, while some other script at the same location uses the same condition works fine. Another script also checks whether Release folder is present in the code or not, it is not it will do some operation. Any idea why the same <code>IF</code> is failing as I am calling from the same location?</p>
  <pre><code>@echo OFF
  
  cd ..
  cd debug/bin/8209
  
  if not exist Release (
  set val2 &quot;&quot;
  echo %val2%
  echo start the script 
  
  readelf qcdsp28909.mbn -l | awk '{if (match($6,/0x/)){if ($1 == &quot;LOAD&quot; ) print strtonum($6)}}'|  awk '{ sum+=$1} END {print sum/1024/1024}' &gt; value.txt 2&gt;&amp;1
  
  set /p size=&lt;value.txt
  
  echo %size%
  
  for /f &quot;tokens=1,2 delims=.&quot; %%a  in (&quot;%size%&quot;) do (
    set first_part=%%a
    set second_part=%%b
  )
  
  set second_part=%second_part:~0,1%
  echo %second_part%
  if defined second_part if %second_part% GEQ 5 ( 
  
      set /a rounded=%first_part%+1
  ) else ( 
      set /a rounded=%first_part%
  )
  
  echo %rounded%
  
  set /a rounded= &quot;%rounded% * 1024 * 1024&quot;
  
  echo %rounded%
  
  call cmd /c exit /b %rounded%
  set hex=%=exitcode%
  
  
  set val2=%hex%
  setx val2 %hex% /m
  echo %val2%
  )
  </code></pre>