C
curtis m. west
hi NG
sorry for this maybe stupid question:
i have this construction:
----->>>> CUT ON <<<<<-----
Set objFso = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("<mypath>")
For Each objFile in objFolder.Files
response.write(objFile.Name&"<br>")
next
set objFolder = nothing
set objFSO = nothing
----->>>>> CUT OFF <<<<<----
so far, so good. but how can i get only
ONE filename - only the name of the
"first" file. i don't care about a special
order.
"Files" seems to be a collection
of "file-objects", so how can i
access only one?
my guess would be anything like:
set objFile = objFolder.Files
set objFile = objFolder.Files[1]
instead of the "for each next"-construction...
thanks for a short feedback
greetz, curtis
sorry for this maybe stupid question:
i have this construction:
----->>>> CUT ON <<<<<-----
Set objFso = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("<mypath>")
For Each objFile in objFolder.Files
response.write(objFile.Name&"<br>")
next
set objFolder = nothing
set objFSO = nothing
----->>>>> CUT OFF <<<<<----
so far, so good. but how can i get only
ONE filename - only the name of the
"first" file. i don't care about a special
order.
"Files" seems to be a collection
of "file-objects", so how can i
access only one?
my guess would be anything like:
set objFile = objFolder.Files
set objFile = objFolder.Files[1]
instead of the "for each next"-construction...
thanks for a short feedback
greetz, curtis