Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetFolder issues 1

Status
Not open for further replies.

ralphonzo

Programmer
Apr 9, 2003
228
GB
OK, this is really starting to wind me up now.

I'm trying to get the contents of a folder with the following code:

Code:
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("weddings")
Set fc = f.Files
For Each f1 in fc
s = s & f1.name
s = s & vbCrLf
Next
Response.Write s

I'm getting the old favourite 'Microsoft VBScript runtime error '800a004c' Path not found /weddings.asp, line 49'.

The folder weddings absolutely exists is in the same directory as the code file - I'm displaying images from that same folder in the same page.

any takers?
 
Have a look at the Server.MapPath method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
What would we all do without clever people?

Thanks PHV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top