PDA

Click to See Complete Forum and Search --> : (Resolved)ShellExecute to FindFiles


JemimaChadwick
Sep 25th, 2001, 08:20 AM
Hi,
I am using the ShellExecute call to open the FindFiles Dialog. I am making the call thus (borrowed from Peet's contributions):


Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Private Const SW_SHOWNORMAL = 1

Private Sub Command1_Click()
Dim l As Long
l = ShellExecute(Me.hwnd, "Find", "E:/Jemmy", "", "", SW_SHOWNORMAL)
End Sub


The Find dialog appears. Now, When I give a search criteria, I need to get the results of this find in a recordset or Array or any other means for me to loop through the results and work around with it. Has anyone anything to suggest on this?

Note: The above is the requirement. So I don't mind if thr's an alternative solution than using ShellExecute either.

thanks,
Jemima.

jim mcnamara
Sep 25th, 2001, 04:16 PM
Here is a good discussion and samples on find file. But as you read it, you'll see that you need a different strategy - find files doesn't return a value...

http://www.mvps.org/vbnet/code/shell/findallfiles.htm

jim mcnamara
Sep 25th, 2001, 04:19 PM
Oh - and here is what I've found on .fnd file formats

JemimaChadwick
Sep 26th, 2001, 02:19 AM
Jim...i cldn't find the way to capture the results here. But i got a post on the General VB Forums that gave it. Thanks anyways, Jim.

- Jemima.