title: Nested If Exist statements in Batch File
body: <p>Ok, I'm trying to do a couple nested IF EXIST statements to check for the presense of a couple folders. If the first folder exists, set Folder1 to equal 1, and then skip to Install. Same with the Folder2, and then if neither folder exists just skip to install.</p>
  
  <p>But even when Folder1 doesn't exist, this still sets %Folder1% to equal 1. What am I missing/not doing?</p>
  
  <p>Thanks!</p>
  
  <pre><code>if exist "c:\folder1" set Folder1=1
      echo %Folder1%
      goto install
  else if exist "c:\folder2" set Folder2=1
      echo %Folder2%
      goto Install
  else goto Install   
  
  :Install
  </code></pre>