title: Get directory name from path of %CD%
body: <p>Given that the current directory, <code>%CD%</code> is </p>
  
  <pre><code>C:\Parent\Child
  </code></pre>
  
  <p>In a batch file, how can I get the value <code>Child</code> in to a variable?</p>
  
  <p>thanks</p>