Help - Search - Members - Calendar
Full Version: How can I create links to all of the .htm files?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
eska
Say I have a folder with aprox 20,000 .htm files and want to create an index page that lists them as "Texthere 1" "Texthere 2" and etc... how would I go about doing that ??


Thank you.
Brian Chandler
Either write a script to read the directory contents and list the files as links, or use the default server page that does this for you.
eska
Thank you for the quick response, it is appreciated by me over here.
How does one go about writing a script, now is that Java or some of a thing?


Hey, thanks.. cool.gif
Brian Chandler
QUOTE
Thank you for the quick response, it is appreciated by me over here.
How does one go about writing a script, now is that Java or some of a thing?



If by "Java" you mean Java, probably not, and if by "Java" you mean Javascript (which is unrelated), then certainly not. Probably Perl or PHP, and there must be plenty of examples you can copy from. Try searching for "PHP script directory listing"...

The easiest way is to use the built-in function - do not set a default page to be displayed, and the server will generate a list of all files in the directory. This is probably harder to customise though, particularly if you want to list _only_ the *.htm files, for example.
Peter1968
There's apache's IndexIgnore directive which can be used to hide or display files.

Of course, this assumes apache as the server and the knowledge/ability on how to use .htaccess files.

http://httpd.apache.org/docs/2.0/mod/mod_a...tml#indexignore
Christian J
20,000 HTML documents sounds like a lot to list on a single web page (which I guess is what Apache directives would normally do).

Maybe some PHP script exists that distributes them on several pages in some way or another.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.