サーバー オブジェクトによる従来の ASP を使用して、仮想フォルダー内のファイルにアクセスしています。フォルダを取得するためのコードは次のとおりです。
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Dim mapPath
mapPath = Server.MapPath("http://development/far/")
Set farFolder = FSO.GetFolder(mapPath)
ディレクトリをループすると、ファイルが見つからないというエラーが発生します。//development/far/ をブラウザーに入れると、ファイルが表示されます。私はaspにかなり慣れていないので、どこが間違っているのかわかりません。
これは、ディレクトリをループするときのコードです。
For Each item in farFolder.Files
Set matches = re.Execute(item.Name)
if(matches.Count=1) then
Response.Write ("<a target=""_blank""href=""" & item.Path & """>" & item.Name & "</a> <br>")
End if
Next