DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

After I run a query can I get it to return the number of files matched and each individual file name?

After I run a query can I get it to return the number of files matched and each individual file name?  I am trying to do a data mining routine and this would be helpful. 
BBANACKI
0 Kudos
Message 1 of 2
(3,218 Views)
Hi bbanacki,

Please have a look at the following code:

Define your queries and then:

oAdvancedQuery.ReturnType=eSearchFile
oMyDataFinder.Results.MaxCount = iMaxNumberOfReturndElements
Call oMyDataFinder.Search(oAdvancedQuery)
Set oMyResults  = oMyDataFinder.Results

If oMyResults.IsIncomplete Then
  msgbox "The first " & str(oMyResults.Count) & " files found"
Else
  msgbox str(oMyResults.Count) & "  files found"
End If

for iLoop = 1 to oMyResults.Count
  Cell.Text = oMyResults(iLoop).Properties("Name").Value
  Cell.Text = oMyResults(iLoop).Properties("fullpath").Value
next

Greetings
Walter
Message 2 of 2
(3,215 Views)