title: cmd command to go to a sub directory of where the batch file was opened
body: <p>So that title was confusing.  Let me tell you my needs:
  I'm wanting to open a batch file that is located in <code>c:\documents\test\</code></p>
  
  <p>in this batch file i'm wanting to collect the names in c:\documents\test\data and convert it to a text file.</p>
  
  <p>Now the easy way to do this would be:</p>
  
  <pre><code>CD c:\documents\test\data
  dir/b/o:n &gt; names.txt
  </code></pre>
  
  <p>but my issue is that i want to move the folder "\test" around and always be able to call on the names in the "\data" file.</p>
  
  <p>Therefore this is what i really need:</p>
  
  <pre><code>CD [variable that says current location] + "\data"
  </code></pre>
  
  <p>but i dont know how to do this.  Please explain your answers thanks.</p>