List Files in a Web Folder

J

J P Singh

Hi All

I want to create a webpage which will list all the files in particular
folder and hyperlink to them to allow users to view the grpahics online
without having to send each file to them by email.

I got the following code but gives me a VBScript error. I have created a
folder called files under the home directory of this website and have added
the name of the folder

Can someone please help?


<%@ LANGUAGE=VBScript %>
<%
Dim ofs,of
Dim fi
set ofs = createobject("Scripting.FileSystemObject")
set of = ofs.getFolder("files") ' blieve this is the problem
For Each fi In of
Response.Write("<a href='" + fi.Name + "'>" + fi.Name + "<br>")
Next fi
%>

Microsoft VBScript compilation error '800a0401'
Expected end of statement

/default.asp, line 13

Next fi
-----^
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top