Forum Moderators: open
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim rootFolder
Set rootFolder = fso.GetFolder(Server.MapPath("./."))
Dim files
Set files = rootFolder.Files
For Each file in files
Response.Write "<li><a href="""&file.Name&""">"
Response.write file.Name &" </a></li> "
Next
This works fine, however I want to exclude files containing certain strings (e.g. "index") from appearing in the list.
If any more expereinced ASP-ers out there who can give me a hand it would be greatly appreciated. All my attempts so far have resulted in 'Object not a collection' errors or similar troubles.