Esempio n. 1
0
session.Initialize('password')

fileCount = 0

hr5doe = 0
exchange = 0
exchangeArray = []
doe = 0
lnc = 0

f = open('addy_rw.csv','w')
f.write('"File Path",Exchange,DOE,HR5DOE,LNC,Offenders\n')

#dbdir = session.getDbDirectory('YDLN1')

dbdir = session.getDbDirectory('RWLN2')

db = dbdir.getFirstDatabase(1247)
while db != None:
	if (db.FilePath.find('roaming') >= 0 and db.FilePath.find('names.nsf') >= 0):
		try:
			fileCount += 1
			db.Open()
			notesCollection = db.Search('Form="Person"',None,0)
			d = notesCollection.getFirstDocument()
			while d != None:

				if (d.getItemValue('MailAddress')[0].find('Exchange') >= 0 or \
				    d.getItemValue('MailDomain')[0].find('Exchange') >= 0 or \
				    d.getItemValue('FullName')[0].find('@Exchange') >= 0):
				    
Esempio n. 2
0
    while doc != None:
        ids.append(doc.universalid)
        if not doc.isValid:
            print("Invalid document")
        doc = coll.getnextdocument(doc)
    return ids


s = Dispatch("Lotus.NotesSession")
s.initialize()

srvsrc = sys.argv[1]
srvtgt = sys.argv[3]

# Open source db
dbdir = s.getDbDirectory(srvtgt)
dbsrc = s.getdatabase(srvsrc, sys.argv[2])

# Open target db
dbtgt = dbdir.OpenDatabaseByReplicaID(dbsrc.ReplicaId)

# retrieve a list of all documents in the database
step = step + 1
print("%d - Retrieving documents" % step)
docsrc = dbsrc.AllDocuments
doctgt = dbtgt.AllDocuments

# make a list of UNID for each db
step = step + 1
print("%d - Retrieving UNIDs" % step)
idsrc = getids(docsrc)