Add Method

This method adds a path rule to the list of path rules.

Syntax

ISitePaths.Add(Path, Included)

Parameters

Path

The full path on the site that Search crawls or avoids.

Included

If True, Search crawls Path; if False, Search does not crawl Path.

Example

The following example add the path C:\Tmp to the list of paths that Search avoids on the Microsoft.com site.

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSites, objSite, objPaths 

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

objPaths.Add "C:\Tmp", False 

'Release objects
Set objPaths    = Nothing 
Set objSite     = Nothing 
Set objSites    = Nothing 
Set objCatalog  = Nothing 
Set objCatalogs = Nothing 
Set objBuildServer = Nothing 
Set objSearchAdmin = Nothing 
 

See Also

ISitePath, Remove


© 1997-1998 Microsoft Corporation. All rights reserved.