Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Files in Directory

Status
Not open for further replies.

pleddy

IS-IT--Management
Jul 2, 2001
5
US
Im trying to create a script that will take a directory off of a webserver and display the filenames of all of the image files that are located in that directory. Can anyone offer any suggestions.

-pleddy
 
well... I used asp's file system object to get an explorer like tree into the browser. If you look at at the asp's fso that will give you an idea of what properties and methods are available. This little utility "siteman" here is pretty cool, it uses the fso and builds an entire ftp interface. I looked at the code and got a few ideas for the tree-view I did. Also asp 101 has a good tutorial that associates an image with the appropriate file type, check it out.
After saying and doing all that, I noticed that MS has a "Web Folder" Behavior that is supposed to act like explorer in the browser, here's a link
If you haven't used CSS Behaviors, real quick it's just a file written in js or vbscript with a .htc extension that you use in a css class like this

.explorerView
{
behavior:url(maketreeview.htc)
}

good luck,
Liz
 
Considering that you want to list files off the SERVER, and javascript is a CLIENT SIDE language, I don't think it will work. You can easily write a perl cgi script to do this, however. In fact, I believe there is a current thread about doing exactly what you want.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Switch to Zope It's free and it's better than ASP+PHP+Perl+Cold Fusion alltogether (and I'm not exaggerating) :)
All your remote files are browsable by default, via the web, based on permissions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top