Remove Method

This method removes a mapping from the list of mappings.

Syntax

IMappings.Remove(From)

Parameters

From

The location in the file system where the file is located.

Example

The following example removes the mapping of C:\InetPub\wwwroot from KMSampleCatalog2.

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objMappings 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1") 
Set objBuildServer = objSearchAdmin.BuildServer 
Set objCatalogs = objBuildServer.BuildCatalogs 
Set objCatalog  = objCatalogs("KMSampleCatalog2") 
Set objMappings = objCatalog.objMappings 

objMappings.Remove("C:\InetPub\wwwroot")

'Release objects 
Set objMappings = Nothing 
Set objCatalog  = Nothing 
Set objCatalogs = Nothing 
Set objBuildServer = Nothing 
Set objSearchAdmin = Nothing 
 

See Also

Add


© 1997-1998 Microsoft Corporation. All rights reserved.