For Each objFile in objFolder.Files
システムがこの行でメモリにどれだけ格納するか、およびのようなものを使用して反復することobjFile.Files.Count
がより有益であるかどうかはわかりません。次のコードを使用すると、重大なパフォーマンスの問題が発生するかどうかを誰かが知っていますか?
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Get the folder object associated with the directory
Dim objFolder
Set objFolder = objFSO.GetFolder("C:\InetPub\wwwroot")
Response.Write "The files found in " & objFolder.Name & ":<br>"
'Loop through the Files collection
Dim objFile
For Each objFile in objFolder.Files
Response.Write objFile.Name & "<br>"
Next
'Clean up!
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing