ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods







Property:  Folders Collection.Item

object.Item ("foldername")

This property returns an Item from the collection relating to a specified key (foldername).

The following code shows how to retrieve an item from a Folders collection.

<%
Code:
Dim filesys, demofolder, folcoll, selectfolder
Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofolder = filesys.GetFolder("foldername")
Set folcoll = demofolder.SubFolders
selectfolder = folcoll.Item("foldername")
%>