Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > List Files in a Web Folder

Reply
Thread Tools

List Files in a Web Folder

 
 
J P Singh
Guest
Posts: n/a
 
      09-05-2003
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
-----^


 
Reply With Quote
 
 
 
 
Randy Rahbar
Guest
Posts: n/a
 
      09-05-2003
> Next fi
> -----^


Get rid of the fi and try again. It should just be Next.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to create the folder "new folder: no new files Cindy Stuart Computer Support 5 06-03-2007 07:32 AM
How do you get a list of files from server folder to display on in a list control maglev_now@yahoo.com ASP .Net 4 10-20-2006 12:39 PM
list of files in a web folder Amanda H ASP General 4 02-21-2005 04:36 PM
Interesting one : Retrieve a list of files within a web folder John ASP .Net 2 10-22-2004 11:13 PM
Can't copy Outlook Ex files in folder to Windows folder? Paul - xxx Computer Support 2 08-20-2003 03:06 AM



Advertisments