title: How to get just the name of a folder without path from full folder path in 8.3 format?
body: <p>How to get just the name of a folder without path from full folder path in 8.3 format?</p>
  
  <p>How can I get the just the name of the target folder under Windows command line?</p>
  
  <p>I have folder strings like these:</p>
  
  <pre><code>C:\Users\Fred\DOCUME~1
  C:\Users\Fred\Music
  C:\Users\Fred\DOWNLO~1\FREEDO~1
  </code></pre>
  
  <p>How can I get just the target folder name using a batch script to get:</p>
  
  <pre><code>FREEDO~1
  Music
  DOCUME~1
  </code></pre>