Quote:
Originally Posted by Cableguy
List all files is easy, searching for a particular string in any of those files...
The easiest way is to load esch file and do the search in each of them, populating some sort of "Hit-list" with the results...
But that would be very time and resouce consuming..
|
Yeah well that is what I have done so far.
I guess I was hoping someone had some other method.
My Code(obviously I will replace the message box with populating a list)
Code:
ALFiles.Clear
FileSearch(ALFiles,SubString(wikiDir,0,StrLength(wikiDir)-1),"*.txt")
For f=0 To ALFiles.Count-1
FileOpen (c1, ALFiles.Item(f), cRead ,, cASCII)
contents = FileReadToEnd(c1)
FileClose (c1)
r=StrIndexOf(contents,"[" & currentpage & "]",0) '+ StrIndexOf(contents,"][" & currentpage & "]]",0)
s = StrIndexOf(contents, "][" & currentpage & "]",0)
If r>-1 AND s = -1 Then
Msgbox(ALFiles.Item(f) & crlf & "Is Backlink")
End If
Next