Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ASP 3.0 : Urgent!! problem with listing files Signup · Login
Author Thread
Urgent!! problem with listing files
Posted in tutorial: Working with Drives, Folders and Files in ASP
·  gpal
User
Joined: 20 Jan 2006
Total Posts: 1

Urgent!! problem with listing files

Posted: 20 Jan 2006
I am using a simple code so as to list all the files in a directory. the code is

Whichfolder=server.mappath("\") &"/upload/"
Dim fs, f, f1, fc
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Whichfolder)
Set fc = f.files

For Each f1 in fc
Response.write (f1.name & "<BR>")
Next

the problem is that instead getting results, i get a blank page wich seams to be loading and processing the code for a long time. What seams to be the problem? pleaze pleaze help.. thanx :)
·  umarino
User
Joined: 26 Sep 2006
Total Posts: 1
NO problem with listing files
Posted: 26 Sep 2006
It works fine on my webserver!

<%
Whichfolder=server.mappath("\") & "/300606/"
Dim fs, f, f1, fc
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Whichfolder)
Set fc = f.files

For Each f1 in fc
Response.write (f1.name & "<BR>")
Next
%>

OUTPUT:
index.htm
photos.js
photos.xml
UserSelections.txt
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
1 Visitor

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.