Click to See Complete Forum and Search --> : files
asabi
Jul 11th, 2000, 03:39 PM
I need to get the files in a folder (on the server) using ASP.
Just the file names, something that would return me an array with the names of the files inside a certain folder on the server.
Mark Sreeves
Jul 12th, 2000, 02:57 AM
Modify this to suit your needs...
<%@ Language=VBScript %>
<html>
<%
Set fileIO = CreateObject("Scripting.FileSystemObject")
path=Server.Mappath(".")
Set Dir=fileIO.GetFolder(path)
Set FileCollect=Dir.Files
For Each item in FileCollect
Response.Write("<A HREF='" & item.name & "'>" & item.name & "</A><BR>")
Next
set fileIO=Nothing
%>
</html>
asabi
Jul 12th, 2000, 12:29 PM
Thanks .. :-)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.