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
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)
%>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I added the mapurl funtion to the page . Lo and Behold it works now.,
Thanks guys