What API to use?
-
Hi all, I'm trying to write a C# app to emulate the search functions in Windows Explorer, including "find in files" (otherwise I wouldn't need the help!) I figure there must be part of the Win32 API that performs the find in files function for a set of files, but don't know the name. Can anybody give me any pointers? Thanks, Chris
-
Hi all, I'm trying to write a C# app to emulate the search functions in Windows Explorer, including "find in files" (otherwise I wouldn't need the help!) I figure there must be part of the Win32 API that performs the find in files function for a set of files, but don't know the name. Can anybody give me any pointers? Thanks, Chris
c2423 wrote:
I figure there must be part of the Win32 API that performs the find in files function for a set of files
Not that I know of.
c2423 wrote:
Can anybody give me any pointers?
Indexed or non-indexed files? If it's indexed, you might want to interface with Windows Search[^]. Otherwise, it'd still be creating a list of files, and searching them the old-fashioned way.
I are Troll :suss:
-
c2423 wrote:
I figure there must be part of the Win32 API that performs the find in files function for a set of files
Not that I know of.
c2423 wrote:
Can anybody give me any pointers?
Indexed or non-indexed files? If it's indexed, you might want to interface with Windows Search[^]. Otherwise, it'd still be creating a list of files, and searching them the old-fashioned way.
I are Troll :suss:
Thanks for the response. Unfortunately I've no control of whether files are indexed or not. I'll have a look at Windows Search though - maybe that will help a bit... Not to sound completely stupid, but what do you have in mind when you say the old-fashioned way? I'm happy searching text files but not Word, Excel etc?
-
Thanks for the response. Unfortunately I've no control of whether files are indexed or not. I'll have a look at Windows Search though - maybe that will help a bit... Not to sound completely stupid, but what do you have in mind when you say the old-fashioned way? I'm happy searching text files but not Word, Excel etc?
c2423 wrote:
I'm happy searching text files but not Word, Excel etc?
That's why both Windows Search and Google Desktop employ plugins to index a specific filetype. To quote;
MSDN states:
Windows Search currently supports the indexing of over 200 types of items (such as .txt, .html, and .xml file formats) and can work with multiple types of data stores (such as the NTFS file system and Microsoft Outlook).
Searching an index is also functionally different from searching a file; the index isn't updated continuously.
I are Troll :suss:
-
c2423 wrote:
I'm happy searching text files but not Word, Excel etc?
That's why both Windows Search and Google Desktop employ plugins to index a specific filetype. To quote;
MSDN states:
Windows Search currently supports the indexing of over 200 types of items (such as .txt, .html, and .xml file formats) and can work with multiple types of data stores (such as the NTFS file system and Microsoft Outlook).
Searching an index is also functionally different from searching a file; the index isn't updated continuously.
I are Troll :suss:
-
Interesting information. Looks like I might have to think of another approach to it by using plugins. Thanks for the help!
-
Interesting information. Looks like I might have to think of another approach to it by using plugins. Thanks for the help!
If you just want to search through files, you might want to consider using the IFilter interface which allows you to read things like PDF files, Word docs and the likes. More details are here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
If you just want to search through files, you might want to consider using the IFilter interface which allows you to read things like PDF files, Word docs and the likes. More details are here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.