Knowledgebase: Epicenter Server
Remove all contacts not in category
Posted by - NA - on 21 December 2009 01:43 PM

Fixup.vbs script for Epicenter so that only contacts from a certain category will be distributed.

Make sure you Save the file, don't Run it.

Here is the content of the file:

'
' Sample script for Epicenter from Connected Software.
' Demonstrates how to remove all contacts that are not
' members of one or more categories.
'
' This script must be named fixup.vbs and should be
' placed in the same directory as Epicenter Server.exe.
'

Option Explicit

Dim c
Dim prop
Dim cats

for each c in Contacts

 ' If you want to use this script for the Exchange GAL,
 ' you must use a field other than Categories because
 ' Categories is not supported by Exchange. If you can
 ' set the custom fields, then you can use "User1", "User2",
 ' "User3" and "User4" to access the first four custom fields
 ' in Exchange.

 
prop = c.GetProperty("Categories")
 cats = Split(prop, ";")

 Dim keep
 keep = 0

 Dim cat
 for each cat in cats
   ' TODO: Change "Friend" to be the name of the category to keep.
   if cat = "Friend" then keep = 1
   ' If you want other categories to be kept, add more "if"
   ' statements below.  For example:
   ' if cat = "Customer" then keep = 1
 next

 if keep <> 1 then c.Remove

next

 

 



Attachments 
 
 fixup.vbs (0.90 KB)
(1 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako Fusion