title: Parentheses in Batch Files
body: <p>Something rather odd happening with the parentheses for this code:</p>
  
  <pre><code>Setlocal EnableDelayedExpansion
  MyFOLDER=
  FOR %%B IN (c,d,e,f,g) DO (@%%B: 2&gt;nul &amp;&amp; set z=%%B &lt;nul if exist %z%\
  (if %MYFOLDER%==[] (echo %z%
  )
  )
  )
  </code></pre>
  
  <p>The above compiles, but this doesn't:</p>
  
  <pre><code>Setlocal EnableDelayedExpansion
  MyFOLDER=
  FOR %%B IN (c,d,e,f,g) DO (@%%B: 2&gt;nul &amp;&amp; set z=%%B &lt;nul if exist %z%\
  (if %MYFOLDER%==[] (
  echo %z%
  )
  )
  )
  </code></pre>
  
  <p>Nor this</p>
  
  <pre><code>Setlocal EnableDelayedExpansion
  MyFOLDER=
  FOR %%B IN (c,d,e,f,g) DO (@%%B: 2&gt;nul &amp;&amp; set z=%%B &lt;nul if exist %z%\
  (if %MYFOLDER%==[]
  (
  echo %z%
  )
  )
  )
  </code></pre>
  
  <p>nor any other combination where "echo %z%" is below the (if MYFOLDER) line. Is there anything in the "FOR" line that is suspect?</p>