Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DIR a directory from a ASP page...
Message
General information
Forum:
Visual Basic
Category:
VBScript
Miscellaneous
Thread ID:
00325530
Message ID:
00325539
Views:
21
>I am looking for a way to dinamicly display a list for file form a directory with a ASP page.
>
>My objective is to display a list of link that refers to files on the server that cannot be access with a link. When the use click on the file the ASP (VB Scrip) code copy the file to the public place and send it to the browser. The files are Word document.
>
>Any one can help me on this?

Maybe you can use this code to list files (using the File System Object):

sub ShowFileList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
s = s & f1.name
s = s & vbcrlf
s = s & "Created: " & f1.DateCreated & vbcrlf
s = s & "Last Accessed: "& f1.DateLastAccessed & vbcrlf
s = s & "Last Accessed: " & f1.DateLastModified & vbcrlf & vbcrlf
Next
Response.Write(s)
End sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform