Help - ASP & public folder access

J

James

Hello All,

I'm trying to read the contents of a local folder and output the file names
as text (code below.) However, my browser freezes because of line: " set
folder = fso.GetFolder("c:\") " The code below should work however I'd be
enormously grateful if someone could either provide alternative code or
suggest a resolution to the freezing. James


<%
dim fso
set fso = Server.CreateObject( "Scripting.FileSystemObject")

dim folder
set folder = fso.GetFolder("c:\")

Response.Write( "<B>Directory: " & folder.Path & "</B><BR><BR>")
dim file
for each file in folder.Files
Response.Write( file.Name & "<BR>")
next
%>
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top