title: How to do if A and B and C equal 1 in a Windows Batch File?
body: <p>I am writing a batch file that needs to check if three variables are all equal to the same thing at the same time.  </p>
  
  <p>What I thought would work was this:</p>
  
  <pre><code>if %A% AND %B% AND %C% EQU 1 goto YES
  </code></pre>
  
  <p>It sadly it did not work.  Usage of this in my file:</p>
  
  <pre><code>:init
  set A=0
  set B=0
  set C=0
  </code></pre>
  
  <p>Then if goes through and gets variables A B and C set to 1 when you tell it to.</p>
  
  <pre><code>if %A% and %B% and %C% EQU 1 (
      goto YES
  ) ELSE (
      goto NO
  )
  </code></pre>
  
  <p>Then the file goes on and does other things not necessary to this question.</p>
  
  <p>Please answer soon.  Thank you.</p>