title: CMD: failure of %~d0 when CALL quotes the name of the batch file
body: <p>Why the following failure of %~d0 to return the batch file's drive letter S: when CALL quotes the name of the batch file?        </p>
  
  <pre><code>S:\!DJ DAP&gt;type test.bat
  R:
  %~d0
  
  S:\!DJ DAP&gt;call test.bat
  
  S:\!DJ DAP&gt;R:
  
  R:\&gt;S:
  
  S:\!DJ DAP&gt;call "test.bat"
  
  S:\!DJ DAP&gt;R:
  
  R:\&gt;R:
  
  R:\&gt;
  </code></pre>
  
  <p>EDIT following responses from Jerry and MC: Here's a non-CALL example showing the same:</p>
  
  <pre><code>R:\&gt;s:
  
  S:\!DJ DAP&gt;type test.bat
  R:
  %~d0
  
  S:\!DJ DAP&gt;test.bat
  
  S:\!DJ DAP&gt;R:
  
  R:\&gt;S:
  
  S:\!DJ DAP&gt;"test.bat"
  
  S:\!DJ DAP&gt;R:
  
  R:\&gt;R:
  
  R:\&gt;
  </code></pre>