title: How locate a file's location and CD to the directory?
body: <p>I'm making a batch that edits a document, but in order to edit, it need's to CD it its location. The problem I'm having is that in order to make it portable, I need the command to be able to locate the file's location.</p>
  
  <p>I've tried:</p>
  
  <pre><code> CD C:\Users\%username%\AppData\Roaming\skype\John
  
   CD C:\Users\%username%\AppData\Roaming\skype\%foldername%\config.xml
  </code></pre>
  
  <p>Any way to get to the location with the config.xml?</p>