S
Steve
I have a folder object whose associated files collection I can iterate
through using a "for each / next" loop to retrieve all the file names
individually. I cannot however directly access the n'th item in the files
collection? Here is my code so far;
' create FSO & folder objects
Dim objFSO
objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFld 'folder object &
objFld = objFSO.GetFolder(Server.MapPath("/test"))
' now directly access file # 4 & return file name
Return objFld.Files.Item(4).Name
This code snippet gives me a "parameter is incorrect" on the "return" line.
Any ideas? Thanks
Steve
through using a "for each / next" loop to retrieve all the file names
individually. I cannot however directly access the n'th item in the files
collection? Here is my code so far;
' create FSO & folder objects
Dim objFSO
objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFld 'folder object &
objFld = objFSO.GetFolder(Server.MapPath("/test"))
' now directly access file # 4 & return file name
Return objFld.Files.Item(4).Name
This code snippet gives me a "parameter is incorrect" on the "return" line.
Any ideas? Thanks
Steve