Link to home
Create AccountLog in
Avatar of painted
painted

asked on

fso error

I keep getting the following error ,which I cannot resolve, with the MapURL code.  Can anyone see what i am doing wrong?


Path2 - 6 files,
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'MapURL'

/path1/path2/jfile1.asp, line 92

<% 
     dim fs, folder, file, item, url
	 path = Server.MapPath("/path1/path2/") 
	 Response.write path
	 
     set fs = CreateObject("Scripting.FileSystemObject")
     set folder = fs.GetFolder(path)
 
    'Display the target folder and info.
 
     Response.Write("<li><b>" & folder.Name & "</b> - " _
       & folder.Files.Count & " files, ")
     if folder.SubFolders.Count > 0 then
       Response.Write(folder.SubFolders.Count & " directories, ")
     end if
     Response.Write "</li>" & vbCrLf
 
     Response.Write "<ul>" & vbCrLf
 
     'Display a list of sub folders.
 
     for each item in folder.SubFolders
       ListFolderContents(item.Path)
     next
 
     'Display a list of files.
		
     for each item in folder.Files
LINE 92 *******	  url = MapURL(item.path)
	   
       Response.Write("<li><a href=""" & url & """>" _
         & item.Name & "</a>" _
         & "</li>" & vbCrLf)
		
     next
 
     Response.Write("</ul>" & vbCrLf)
 
  %>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of asawatzki
asawatzki

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of painted
painted

ASKER

Today just hasn't been my day...thanks for "jarring" my brain!   Splitting the points.

I added the mapurl funtion to the page .  Lo and Behold it works now.,

Thanks guys