title: Batch - display folder names as options
body: <p>I'm trying to create a small batch file which reads a folder (path is set as a variable in the file). It should display the names of all sub-folders as choices for the user and when the user chooses one that folder name should be saved in a variable for later use. The idea is that I have alot of branches I'm working on and in all of them there is a little jar file I want to run with this batch. So the batch present me a list of all branches in the folder and when I pick on it will start the jar file located in that branch folder.</p>
  
  <p>EXAMPLE:</p>
  
  <pre><code>C:\code
  </code></pre>
  
  <p>contains</p>
  
  <pre><code>C:\code\branch1
  C:\code\branch2
  C:\code\branch3
  </code></pre>
  
  <p>Then I want the batch to present the following menu to the user:</p>
  
  <pre><code>1. branch1
  2. branch2
  3. branch3
  </code></pre>
  
  <p>When the user has chosen the folder name (f.ex. branch2) is saved in a variable for later use.</p>
  
  <p>I've tried alot of googling, but nothing helpful came up. Sofar I've managed to read the sub-folders' names, but I dont know where to go from here.. can anyone point me in the right direction?</p>