Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#105744 - 18/07/2002 08:28 List Directory Files on Web Pages using html?
darwin
enthusiast

Registered: 10/01/2002
Posts: 205
I know it depends on the what web server your running but how do you list all files that is in a web folder to show up on an html page. Like some systems, if you don't have an index.html file, it will just list all the files and folders on the directory, like explorer. This other web server I have doesn't support it and says you are unauthorized to view this page, so I'd just like to write a simple html page that will list the directory contents if possible. Basically, I have a about 300 photos I want to share with some people, but don't want to make a link for every picture.

Thanks.

Top
#105745 - 18/07/2002 08:33 Re: List Directory Files on Web Pages using html? [Re: darwin]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
(echo "<HTML><HEAD><TITLE>Pic Index</TITLE></HEAD><BODY>"

for file in *; do
echo "<A HREF=$file>$file</A><BR>"
done
echo "</BODY></HTML>") > pic_index.html
_________________________
Bitt Faulk

Top
#105746 - 18/07/2002 08:39 Re: List Directory Files on Web Pages using html? [Re: wfaulk]
Anonymous
Unregistered


what language is that?

Top
#105747 - 18/07/2002 08:45 Re: List Directory Files on Web Pages using html? [Re: wfaulk]
darwin
enthusiast

Registered: 10/01/2002
Posts: 205
thanks for your reply, although it didn't seem to work. I just pasted the whole thing to notepad and called it my index.htm

anything else i'm supposed to do?


Top
#105748 - 18/07/2002 08:50 Re: List Directory Files on Web Pages using html? [Re: darwin]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
My fault. I made the assumption you were using a real operating system. Since MSWindows comes with basically no useful tools, I don't know of a good way for you to do it. You'll have to copy and paste filenames and then edit it up by hand. At least they don't even provide you with a useful text editor, either.
_________________________
Bitt Faulk

Top
#105749 - 18/07/2002 08:53 Re: List Directory Files on Web Pages using html? [Re: ]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Ummm, Bourne shell....
_________________________
Bitt Faulk

Top
#105750 - 18/07/2002 08:56 Re: List Directory Files on Web Pages using html? [Re: wfaulk]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
well, you could always rename all the files using a batch rename program so they're all nice and in order, then create the first link and copy it a bunch of times, then have loads of fun with the arrow and number keys

It's not the most graceful solution, but then again in some ways neither is Gallery (the setup part at least).

Have you tried Gallery? It's quite a good program...
_________________________
Matt

Top
#105751 - 18/07/2002 08:57 Re: List Directory Files on Web Pages using html? [Re: wfaulk]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

Now, now... be nice... The language was shell - I am not certain which variation off hand.

It sounds like you are running either a microsoft personal web server under 95/98/ME or IIS under NT/W2K/XP. If you are running IIS, there is an option in your home directory configuration that will enable directory browsing. See if that is checked. Please post specifics about your OS and HTTP server. Thanks!
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top