title: For loop to parse files with spaces in path, Command Prompt
body: <p>Have a Windows command prompt line:</p>
  
  <pre><code>for /F %i in ('dir /s /b D:\MyDirectory\filepath\File.xml') do (C:\progra~1\xmlstarlet\xml.exe ed --inplace -d "//xmlTag[data/url[contains(text(),'shop.companyname')]]" %i)
  </code></pre>
  
  <p>One of the more than 100 directories has a space in the path, and this line fails on that directory. Names must be preserved.</p>
  
  <p>Tried changing <code>delims</code> option to <code>^n</code>, but that failed on more than one directory.</p>
  
  <p>Also tried <code>%~dp0</code>but don't understand the syntax, and <code>"%~dp0\File.xml"</code>, which gives me "cannot find the file specified".</p>
  
  <p>How do I get Windows to parse that line with the space? Is there a <code>delims=[not space?]</code> option?</p>