Discussion:
Start a search dialog with fields (filemasks, text, folder) filled in ?
(too old to reply)
R.Wieser
2019-09-17 08:15:19 UTC
Permalink
Hello all,

I would like to start a file search dialog, but would like to have (some of)
the fields (filemasks, text, start folder) already filled in. The below
code will open the file search dialog, but with the filemask and text fields
empty, and wanting to look thru all attached drives.

set objShell = CreateObject("shell.application")
objShell.FindFiles

Even just having to change the "Look in:" starting point is way more of a
bother than using file explorer (which I normally already have open by than)
and open the search dialog from there. :-(

By the way, it does not even need to start the search (I would actually
prefer it doesn't)

tl;dr:
Is there a way to provide the above objShell.FindFiles object with
parameters or call methods to set the filemasks, text and/or folder fields.

Regards,
Rudy Wieser
JJ
2019-09-17 13:41:03 UTC
Permalink
Post by R.Wieser
Is there a way to provide the above objShell.FindFiles object with
parameters or call methods to set the filemasks, text and/or folder fields.
Regards,
Rudy Wieser
Nope. But for Windows XP, you can get the same result by using predefined
*.fnd file - a saved search result file.
R.Wieser
2019-09-17 15:41:16 UTC
Permalink
JJ,
Post by JJ
But for Windows XP, you can get the same result by using
predefined *.fnd file - a saved search result file.
I was not aware that that existsted, but its something to look at. Who
knows, maybe I can generate one on the fly. Thanks for mentioning it.

Regards,
Rudy Wieser
R.Wieser
2019-09-17 16:06:04 UTC
Permalink
JJ,
Post by JJ
But for Windows XP, you can get the same result by using
predefined *.fnd file - a saved search result file.
Scratch that: A saved search that is reloaded doesn't remember its starting
folder. Looking in the file I also do not see a path, and nothing stands
out as a GUID either.

Regards,
Rudy Wieser
Evertjan.
2019-09-17 22:22:05 UTC
Permalink
Post by R.Wieser
JJ,
Post by JJ
But for Windows XP, you can get the same result by using
predefined *.fnd file - a saved search result file.
Scratch that: A saved search that is reloaded doesn't remember its
starting folder. Looking in the file I also do not see a path, and
nothing stands out as a GUID either.
Will this help?

<https://fileinfo.com/extension/fnd>

<https://fileinfo.com/extension/search-ms>
<https://www.howtogeek.com/howto/5316/how-to-save-searches-in-windows-7/>

Seems to work fine in W10
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
R.Wieser
2019-09-18 06:05:21 UTC
Permalink
Evertjan,
Post by Evertjan.
Will this help?
<https://fileinfo.com/extension/fnd>
Yup, I found that page too. It contains nothing about the files internal
make up though.

Remarkable, but I've not been able to google anything pertinent to the .FND
filetype ... :-(
Post by Evertjan.
<https://fileinfo.com/extension/search-ms>
<https://www.howtogeek.com/howto/5316/how-to-save-searches-in-windows-7/>
Shucks. I should have mentioned (in my initial message) that I'm using
XP(sp3). Sorry.

Thanks for the suggestions though.

Regards,
Rudy Wieser
JJ
2019-09-18 10:39:04 UTC
Permalink
Post by R.Wieser
Yup, I found that page too. It contains nothing about the files internal
make up though.
Remarkable, but I've not been able to google anything pertinent to the .FND
filetype ... :-(
Good thing I have one archived. I knew I've read it somewhere. It's an RTF
document, if you don't mind. It was for Windows 9x's FND. Some of the header
field values for XP's FND are different, but the layout and the search
fields seems to be the same.

https://pastebin.com/84JNssqX
R.Wieser
2019-09-18 14:46:00 UTC
Permalink
JJ,
Post by JJ
Good thing I have one archived. I knew I've read it somewhere. It's an RTF
document, if you don't mind. It was for Windows 9x's FND. Some of the header
field values for XP's FND are different, but the layout and the search
fields seems to be the same.
https://pastebin.com/84JNssqX
Thanks very much! Its lots more than currently have - which is, apart from
a hexdump of a .FNDfile nothing :-)

Regards,
Rudy Wieser

Loading...