title: If condition in batch files
body: <pre><code>@echo off
  SET var1="Yes"
  SET var2="No"
  SET var3="Yes"
  if %var1%=="Yes"
      echo Var1 set
  if %var2%=="Yes"
      echo Var2 set
  if %var3%=="Yes"
      echo Var3 set
  </code></pre>
  
  <p>If I run the above script I get the following error. Can anyone pls help?</p>
  
  <blockquote>
    <p>The syntax of the command is
    incorrect.</p>
  </blockquote>
  
  <p>Thanks.</p>