• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

Directory List

Experts,
   I am creating a web page that is currently being saved as an asp file.  One of the tasks I need to do is create a list of text files in a document on my network then list them on a page with a hyperlink enabling the client to read the text file when clicking the hyperlink on the list.  Can someone please help?  If you need some more information please let me know.
-TrEaSoN-
0
TrEaSoN
Asked:
TrEaSoN
  • 3
  • 2
1 Solution
 
BlackManCommented:
You can use FileSystemObject. Here is an example using VBScript:

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("C:\winnt")
Set fc = f.Files
For Each f1 in fc
Response.write f1.name & "<br>"
Next


FileSystemObject doesn't come with IIS, it comes with Windows Scripting Host. Surf to www.microsoft.com/scripting and install WSH. You must install it on the IIS server

0
 
TrEaSoNAuthor Commented:
Do I put this code inside of the <head> tag?
0
 
TrEaSoNAuthor Commented:
Never Mind, I got it to work.  But I still need to know how to put file size and date created next to it.  If you can tell me that, the points are yours.
-TrEaSoN-
0
 
BlackManCommented:
I think it is F1.Size and F1.Date, but it is in the WSH documentation...
0
 
TrEaSoNAuthor Commented:
BlackMan,

  I tried that, but it didn't work.  It doesn't matter though because I did what i needed to do.  Thanks for the help.
-TrEaSoN-
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now