title: How do I pass a semicolon as a literal in a batch file subroutine
body: <p>Given the following Windows batch (.cmd) file,</p>
  
  <pre><code>@echo off
  call :Test arg1; arg2
  exit /B
  
  :Test
  echo %1
  echo %2
  exit /B
  </code></pre>
  
  <p>This displays:</p>
  
  <pre><code>arg1
  arg2
  </code></pre>
  
  <p>How do I pass the semicolon as a literal so it displays:</p>
  
  <pre><code> arg1;
   arg2
  </code></pre>
  
  <p>Thanks very much</p>
  
  <p>UPDATE:</p>
  
  <p>Ok, to make things clearer I'm really trying to do something like this:</p>
  
  <pre><code>@echo off
  call :Execute "c:\Program Files (x86)\Whatever\Test.exe" arg1 arg2
  exit /B
  
  :Execute
  echo %1 %2 %3 %4 %5 %6 %7 %8 %9
  %1 %2 %3 %4 %5 %6 %7 %8 %9
  exit /B
  </code></pre>
  
  <p>Only commands I want echoed will therefore be passed to "Execute" (with a variable number of args). However, these args may contain characters like a semicolon so they need to be passed literally.</p>