Features
      Ask DevGuru
      ASP Resources
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      Tutorials
  Products
      dgCalendar
      dgCharge New!
      dgChart New!
      dgFileUpload
      dgReport New!
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Technologies
      ADO 2.6
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      Transact-SQL Syntax
      VBScript
      WML
      WMLScript
      WSH
      XML DOM

              











OBJECT:  Folders Collection

Implemented in version 2.0
 
When using an instance of the Folder object, its SubFolder property returns a Folders collection consisting of all the subfolders (Folder objects) in that folder.

The following code illustrates how to get a Folders collection and display its contents in the browser.

Code:
<%
Dim filesys, demofolder, subfol, folcoll, folist
Set filesys = CreateObject("Scripting.FileSystemObject") 
Set demofolder = filesys.GetFolder(folderspec) 
Set folcoll = demofolder.SubFolders  
For Each subfol in folcoll
    folist = folist & subfol.Name  
    folist = folist & "<BR>"  
Next
Response.Write folist
%>


PROPERTIES

Count Property
Returns an integer that tells us how many Folder objects there are in the collection.

Syntax: object.Count

Item Property
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.

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

METHODS

Add Method
This method is used to add a new Folder to a Folders collection.

Syntax: object.Add("foldername")


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information