title: Reading Current Directory from XML file
body: <p>I have an XML File I use for my parameters file (e.g. stating paths to action things from, depending on the server a batch file is run from, so I can use the same batch file everywhere)<br>
  For example I have the XML File name "Global.DeployParameters.xml" which looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;parameters&gt;
      &lt;deploy&gt;
          &lt;SoftwareToInstallPaths&gt;
              &lt;softwarepath&gt;
                  C:\Software
              &lt;/softwarepath&gt;
  </code></pre>
  
  <p>and in my batch file I have this to find it and set the variable %softwarepath% to read "C:\Software"</p>
  
  <pre><code>for /f "tokens=1,2 delims=:" %%n in ('findstr /n /i /c:"&lt;softwarepath&gt;" "Global.DeployParameters.xml"') do (
  for /f "tokens=*" %%l in ('type "Global.DeployParameters.xml" ^| more +%%n') do set "softwarepath=%%l" &amp; goto endLoop
  )
  :endLoop
  </code></pre>
  
  <p>and in the same batch file, if I were to do:</p>
  
  <pre><code>COPY "C:\test\*.*" "%softwarepath%"
  </code></pre>
  
  <p>If would work fine and copy the file in there to the location that the batch file is, however if I changed the XML File to read</p>
  
  <pre><code>&lt;softwarepath&gt;
      %~dp0..
  &lt;/softwarepath&gt;
  </code></pre>
  
  <p>to say, copy the content of "C:\test\" to a folder level above where the "Batch file Current Path" is, instead it would make a file the same named "%~dp0" where the batch file is located but If I hard copy in the batch file "%~dp0.." it will work. </p>
  
  <p>I can't hard code this as it's a different location on each server so need to reading from the XML file for that particular server. How can I get it to read the XML text as a command and not the literal text?</p>