A collection of all folder object containers with in a folder object.
For Web-based scripts, the number of entries depends on the user rights.
Returns the number of items in a collection object.
object.Count
Long.
Read-only.
See sample in Example.
Adds a new Folder to a Folders collection.
object.Add(
FolderName As String)
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
See sample in Example.
Returns TRUE if there is any folder in FoldersCollection (HasMoreElements method).
object.HasMoreElements
None.
Boolean.
See sample in Example.
Returns an item based on the specified FolderName.
object.Item(
FolderName As String)
See sample in Example.
Returns the next folder object from the FoldersCollection. If there are no more folders in the collection, it returns NULL.
object.Next
None.
See sample in Example.
Resets the collection of the folder in the FoldersCollection object.
object.Reset
None.
Void.
This example adds a folder to the collection and retrives the attributes of all the folders available in that collection. It also gives the creation date of a specific folder in that collection.
<% Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder ("Sys:\nsn\user")
Set folders = Folder.subfolders
’Adds a folder to the collection
Response.Write Folders.Add("Test")
Response.Write Folders.Count %>
<% ’Resets the collection
Folders.Reset()
’Checks for folders in the collection
Do While Folders.HasMoreElements()
For each folder in Folders
Response.Write Folder.Name
Next
’Sets the pointer to the next folder in the collection
Folders.Next()
Loop %>
<% ’Sets the object to a specified folder
Set Folder = Folders.Item ("Test")
’Returns the creation date of the folder sample
Response.Write Folder.DateCreated %>