title: Path with spaces in for loop of a batch file
body: <p>I am trying this command:</p>
  
  <pre><code>for /f "tokens=3 usebackq" %%i in (`"%~dp0imagex.exe" /info "%~dp0DVD\sources\install.wim" ^| findstr /c:"Image Count:"`) do set ImageCount=%%i 
  echo %ImageCount%
  </code></pre>
  
  <p>I get error if the path %~dp0 contains spaces like "D:\my work". Although I used usebackq and back quote instead of single quote.</p>
  
  <p>the error message is:'D:\my' is not recognized as internal or external command, operable program or batch file.</p>
  
  <p>What is the wrong in my command?</p>