This property specifies whether the path's subdirectories are crawled.
Syntax
ISitePath.IncludeSubdirs
Remarks
If True, Search crawls the path's subdirectories; if False, Search avoids the path's subdirectories.
Search can ignore a path but crawl its subdirectories.
Example
The following example displays whether Search crawls or avoids all of the paths and subdirectories for the site Microsoft.com.
Option Explicit
On Error Resume Next
Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSites, objSite, objPaths, objPath
Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildServer = objSearchAdmin.BuildServer
Set objCatalogs = objBuildServer.BuildCatalogs
Set objCatalog = objCatalogs("KMSampleCatalog2")
Set objSites = objCatalog.objSites
Set objSite = objSites.Item("Microsoft.com")
Set objPaths = objSite.objPaths
Wscript.Echo "The restricted site " & objSite.Name & " has these paths:"
For Each objPath in objPaths
If objPath.Included Then
Wscript.Echo " " & objPath.objPath & " is crawled"
Else
Wscript.Echo " " & objPath.objPath & " is ignored"
End If
If objPath.IncludeSubdirs Then
Wscript.Echo " (and its subdirectories are crawled)."
Else
Wscript.Echo " (and its subdirectories are ignored)."
End If
Next
'Release objects
Set objPath = Nothing
Set objPaths = Nothing
Set objSite = Nothing
Set objSites = Nothing
Set objCatalog = Nothing
Set objCatalogs = Nothing
Set objBuildServer = Nothing
Set objSearchAdmin = Nothing
See Also