title: table-of-contents with links to all the .htm files in a folder
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1620842/how-to-use-javascript-to-open-a-folder-and-list-html-file-names-in-that">how to use javascript to open a folder and list html file names in that?</a>  </p>
  </blockquote>
  
  
  
  <p>On my local Windows computer, I have a folder with a bunch of .htm files.<br>
  I would like to create "table-of-contents.html", which would link to all the .htm files in this folder.</p>
  
  <p>For example, if my folder contains these files:</p>
  
  <pre><code>apple.htm
  pear.htm
  banana.htm
  </code></pre>
  
  <p>then my table-of-contents would contain:</p>
  
  <pre><code>&lt;a href="./apple.htm"&gt;Apple&lt;/a&gt;
  &lt;a href="./pear.htm"&gt;Pear&lt;/a&gt;
  &lt;a href="./banana.htm"&gt;Banana&lt;/a&gt;
  </code></pre>
  
  <p>Of course I could do this manually, but I am looking for a solution that automatically generates the table-of-contents from the current folder.  (This would be a component of a larger script that parses the filenames and reorganizes the links based on the parsed information.)</p>
  
  <p>Any suggestions?  For example, is there a way to use jquery or javascript to generate a list of the htm files in the current folder?</p>