VBScript » Folders Collection » Item

Version: 2.0

Syntax:
object.Item(key) [ = itemvalue]

The Item property allows us to retreive the value of an item in the collection designated by the specified key argument and also to set that value by using itemvalue.

Examples

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

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