Domino Code Fragment

Code Name*
NotesDBDirectory class
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.224.39.74
Description*
The example below retrieves all databases included in the data directory and any directories below the data directory, and displays their titles.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
The dbDirectory class gives you the ability to obtain a list of all the databases on a server or workstation. DbDirectory is a NotesSession class method. The following types of files can be found by the method: DATABASE, TEMPLATE, REPLICA_CANDIDATE, and TEMPLATE_CANDIDATE

Click here to view the example.

Dim dbdir As New NotesDbDirectory("") 'Declare dbdir as a Notes DB directory (current)
Dim db As NotesDatabase
'Declare db as a Notes Database
Set db = dbdir.GetFirstDatabase(DATABASE)
'Set db to the first database retrieved by dbdir
While Not (db Is Nothing)
'While databases still are in the list ...
Messagebox db.Title
'Display the database title
Set db = dbdir.GetNextDatabase
'Get the next database file name from dbdir
Wend
'loop