Path Property

This read-only property specifies the path that Search crawls or avoids.

Syntax

ISitePath.Path

Example

The following example displays the paths 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
  Wscript.Echo "  " & objPath.objPath
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 
 

© 1997-1998 Microsoft Corporation. All rights reserved.