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.CreateOb ject("Scripting .FileSystemObje ct")
Dim objFld 'folder object &
objFld = objFSO.GetFolde r(Server.MapPat h("/test"))
' now directly access file # 4 & return file name
Return objFld.Files.It em(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.CreateOb ject("Scripting .FileSystemObje ct")
Dim objFld 'folder object &
objFld = objFSO.GetFolde r(Server.MapPat h("/test"))
' now directly access file # 4 & return file name
Return objFld.Files.It em(4).Name
This code snippet gives me a "parameter is incorrect" on the "return" line.
Any ideas? Thanks
Steve
Comment