title: How to pass redirect symbols (< and >) to a Windows batch file function?
body: <p>Assume this batch file</p>
  
  <pre><code>call :SomeFunction "a string with an &gt; arrow"
  
  goto:eof
  
  :SomeFunction
    echo %~1
  goto:eof
  </code></pre>
  
  <p>The output of this is </p>
  
  <pre>
  call :SomeFunction "a string with an > arrow"
  echo a string with an  1>arrow
  goto:eof
  goto:eof
  </pre>
  
  <p>and a file named <code>arrow</code> is created which contains <code>a string with an</code>. Note the <code>1&gt;</code>.</p>
  
  <p>How can I prevent the command processor from interpreting the <code>&gt;</code> as a redirection symbol in this situation? (Hint: I've tried <code>^&gt;</code> and that's not it.)</p>
  
  <p>EDIT: The other operators (<code>|</code> and <code>&amp;</code>) are of course also affected.</p>