vielleicht nicht ganz passend zum Thema;
hier mal eine kleine Fingerübung in LS.
Der code gibt in einer Textdatei alle volltextindizierten Dateien auf einem Server aus.
Vielkleicht kann das ja jemand mal brauchen
Const C_DEFAULTFILENAME$ = "FULLTEXT.TXT"
Const C_DEFAULTSERVER$ = "DEWVX01"
Class FileGuard
filenumber As Integer
isopen As Integer
Public Property Get Handle
Handle = filenumber
End Property
Sub New()
filenumber = Freefile( )
isopen = True
End Sub
Sub Close
If isopen Then
On Error Resume Next
Close filenumber
isopen = False
End If
End Sub
Sub Delete
Me.Close
End Sub
End Class
Sub Click(Source As Button)
On Error Resume Next
Dim dbdir As New NotesDbDirectory ( C_DEFAULTSERVER$ )
Dim db As NotesDatabase
Set db = dbdir.GetFirstDatabase ( DATABASE )
Dim FG1 As New FileGuard
outfile% = FG1.Handle
Open TempDir + C_DEFAULTFILENAME$ For Output As outfile%
Dim outString As String
i% = 0
k% = 0
While Not(db Is Nothing)
Call db.Open( "", "" )
If db.IsFTIndexed Then
outstring = db.FilePath + Chr(9) + Chr(9) + Chr(9) +db.Title
Print #outfile%, outString
i% = i% + 1
outstring = ""
End If
Print db.Title, , db.FileName
k% = k% + 1
Set db = dbdir.GetNextDatabase
Wend
Print #outfile%, Chr(10) + Chr(13) + Chr(10) + Chr(13)
Print #outfile%, Cstr(k%) + " databases on server, " + Cstr(i%) + " databases with fulltext index"
FG1.Close
End Sub
Function TempDir As String
Dim tmp As String
tmp = Environ( "TEMP" )
If tmp = "" Then
tmp = Environ( "TMP" )
If tmp = "" Then
tmp = "C:"
End If
End If
TempDir = tmp +"\"
End Function