title: batch for loop with bracket in the command
body: <p>I have a batch file with the following code:</p>
  
  <pre><code>for /f "tokens=*" %%a in ('dir /b /a-d') do (
   echo Processing %%a &gt;&gt;%LOG%
   dtsrun /S(local) /NNotesLoad /A"FilePath:8="%NOTESDIR%\%%a" /AClientID=%1 &gt;&gt;%LOG%
  
   echo Deleting %%a &gt;&gt;%LOG%
   del %%a /q
  )
  </code></pre>
  
  <p>This is returning an error message of "/NNotesLoad was unexpected at this time" because the second bracket is effectively closing the FOR block.</p>
  
  <p>I have to leave the (local) as the /S parameter. <br/>
  How do I escape the brackets in the dtsrun line? </p>
  
  <p>EDIT: Turns out you can specify the server in dtsrun for local as .</p>
  
  <p>But I would still like an answer to the escaping for the brackets.</p>