title: CMD nested double quotes in argument
body: <p>I am having problems with passing arguments to a batch function with nested double quotes.</p>
  
  <p>Here is an example of a batch file:</p>
  
  <pre><code>@SET path_with_space="c:\test\filenamewith space.txt"
  @CALL :FUNCTION blaat1, "blaat2 %path_with_space%"
  @GOTO :EOF
  
  :FUNCTION
  @echo off
  echo arg 1: %~1
  echo arg 2: %~2
  echo arg 3: %~3
  GOTO :EOF
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>arg 1: blaat1
  arg 2: blaat2 "c:\test\filenamewith
  arg 3: space.txt""
  </code></pre>
  
  <p>What should I do to make <code>arg 2: blaat2 "c:\test\filenamewith space.txt"</code>?
  Note that I cannot adjust the function or change the <code>%path_with_space%</code>. I can only control what is passed to the function.</p>