Folders Property

Microsoft FrontPage Visual Basic

Some of the content in this topic may not be applicable to some languages.

Returns a WebFolders collection that represents the child folders contained the specified folder. Read-only.

expression.Folders

expression    Required. An expression that returns a WebFolder object.

Remarks

The Folders property returns the WebFolders collection for the specified Web site. To access the collection, you declare a variable of type WebFolders as in the statement Dim myFolders As WebFolders, and then set the variable to Web.RootFolder.Folders.

Example

The following example retrieves two of the properties of a folder and concatenates the data into a string with a pipe ("|") delimiter separating the data.

Note  The PropertyKeys shown in this example apply to a Web site created with the One Page Web Site template. Other templates may use other PropertyKeys. For more information about using PropertyKeys, see the Properties collection.

Private Sub GetFolderProperties()
    Dim myFolders As WebFolders
    Dim myFolder As WebFolder
    Dim myHasSubDirs As String
    Dim myIsScriptable As String
    Dim myProperties As Properties

    Set myFolders = ActiveWeb.RootFolder.Folders

    For Each myFolder In myFolders
            Set myProperties = myFolder.Properties
           
            myHasSubDirs = myHasSubDirs & _
                        myProperties("vti_ hassubdirs") & "|"
            myIsScriptable = myIsScriptable & _
                        myProperties("vti_ isscriptable") & "|"
    Next
End Sub