title: Escape user input in windows batch file
body: <p>I have a windows batch file that accepts a password as user input:</p>
  
  <pre><code>SET /P PASSWORD=Password:
  </code></pre>
  
  <p>This password might have characters that need escaping like <code>!</code>. The <code>PASSWORD</code> variable then gets passed to other batch files using <code>CALL</code></p>
  
  <pre><code>CALL Foo.Bat %PASSWORD%
  </code></pre>
  
  <p>How can I ensure that special characters get escaped and passed correctly as parameter? For example if the user inputs <code>!%"£$"</code> I want <code>%1</code> to be <code>!%"£$"</code> in <code>Foo.bat</code>.</p>