|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Search Engine CONTROL?I've written an app that does nothing more than provide
me with a treeview showing files of various formats in a folder tree. These files may be PDFs, ASCII text, HTML, mail messages, etc. What I'd like to do is to add some sort of a search function to my app. Is it likely I can find some sort of search control to add, or would I have to write something on my own (the latter being daunting to me, to say the least)? TIA for any suggestions or help. -------------------------------------------------------- The impossible just takes a little longer
Show quote
Hide quote
"Patrick Pirtle" <p**@skilling.com> wrote in message I've never heard of any such control... except, maybe a webbrowser control news:OkLxy%23ZgFHA.1048@TK2MSFTNGP14.phx.gbl... > I've written an app that does nothing more than provide > me with a treeview showing files of various formats in > a folder tree. These files may be PDFs, ASCII text, > HTML, mail messages, etc. What I'd like to do is to > add some sort of a search function to my app. > > Is it likely I can find some sort of search control to add, > or would I have to write something on my own (the > latter being daunting to me, to say the least)? > > TIA for any suggestions or help. > -------------------------------------------------------- > The impossible just takes a little longer that points to Google or something. So, you want to search... search the drive? search the files for text? More info required. -- Ken Halter - MS-MVP-VB - http://www.vbsight.com DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Please keep all discussions in the groups.. What I'd like to do is search the files that are populating
my treeview for text. -------------------------------------------------------- The impossible just takes a little longer Ken Halter wrote: Show quoteHide quote > "Patrick Pirtle" <p**@skilling.com> wrote in message > news:OkLxy%23ZgFHA.1048@TK2MSFTNGP14.phx.gbl... >> I've written an app that does nothing more than provide >> me with a treeview showing files of various formats in >> a folder tree. These files may be PDFs, ASCII text, >> HTML, mail messages, etc. What I'd like to do is to >> add some sort of a search function to my app. >> >> Is it likely I can find some sort of search control to add, >> or would I have to write something on my own (the >> latter being daunting to me, to say the least)? >> >> TIA for any suggestions or help. >> -------------------------------------------------------- >> The impossible just takes a little longer > > I've never heard of any such control... except, maybe a webbrowser > control that points to Google or something. > > So, you want to search... search the drive? search the files for > text? More info required. "Patrick Pirtle" <p**@skilling.com> wrote in message That'll require code <g> All of the code will be up to you. Basically, since news:OWBpEEagFHA.2700@TK2MSFTNGP15.phx.gbl... > What I'd like to do is search the files that are populating > my treeview for text. > -------------------------------------------------------- > The impossible just takes a little longer they're in the tree, you know where the files are located on the hard-drive. Then, it should just be a matter of opening each one and searching. Problem is, PDFs and others are probably stored in binary and/or encrypted formats. That's a whole bunch more code <g> It may even require that you buy the SDK from whatever vendor you're supporting. -- Ken Halter - MS-MVP-VB - http://www.vbsight.com DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Please keep all discussions in the groups.. Thanks for the reply, Ken. I was afraid of that.
I think the gurus on this list should write enough controls that I NEVER have to do any work! Hehe Ken Halter wrote: Show quoteHide quote > "Patrick Pirtle" <p**@skilling.com> wrote in message > news:OWBpEEagFHA.2700@TK2MSFTNGP15.phx.gbl... >> What I'd like to do is search the files that are populating >> my treeview for text. >> -------------------------------------------------------- >> The impossible just takes a little longer > > That'll require code <g> All of the code will be up to you. > Basically, since they're in the tree, you know where the files are > located on the hard-drive. Then, it should just be a matter of > opening each one and searching. Problem is, PDFs and others are > probably stored in binary and/or encrypted formats. That's a whole > bunch more code <g> It may even require that you buy the SDK from > whatever vendor you're supporting. -- -------------------------------------------------------- The impossible just takes a little longer "Patrick Pirtle" <p**@skilling.com> wrote in message Still need more info, by search do you mean file names or file content?news:OWBpEEagFHA.2700@TK2MSFTNGP15.phx.gbl... > What I'd like to do is search the files that are populating > my treeview for text. > -------------------------------------------------------- > The impossible just takes a little longer If it's content you are after you'll need to write or find a GREP of some kind (google it). It might be easiest to use a 3rd party GREP with output directed to a text file then you can parse that file. If it's file names you want the easiest method might be to have a temporary database and search that. Best regards Dave. Show quoteHide quote > Ken Halter wrote: >> "Patrick Pirtle" <p**@skilling.com> wrote in message >> news:OkLxy%23ZgFHA.1048@TK2MSFTNGP14.phx.gbl... >>> I've written an app that does nothing more than provide >>> me with a treeview showing files of various formats in >>> a folder tree. These files may be PDFs, ASCII text, >>> HTML, mail messages, etc. What I'd like to do is to >>> add some sort of a search function to my app. >>> >>> Is it likely I can find some sort of search control to add, >>> or would I have to write something on my own (the >>> latter being daunting to me, to say the least)? >>> >>> TIA for any suggestions or help. >>> -------------------------------------------------------- >>> The impossible just takes a little longer >> >> I've never heard of any such control... except, maybe a webbrowser >> control that points to Google or something. >> >> So, you want to search... search the drive? search the files for >> text? More info required. > > Thanks for the reply, Dave.
It's content I'm after. Basically, I've got a collection of files, in different formats, that include: - Tips and info gathered from the newsgroups (PDF and ASCII) - Instructions for various software apps that were created in-office (PDF) - Powerpoint presentations (don't expect to search these) - Excel spreadsheets that are part of tutorials (don't expect to search these) - CAD drawings from AutoCad and MicroStation that are part of tutorials (don't expect to search these) - Code snippets (ASCII ) I'd like to be able to search for "treeview OR tree-view" and have it populate a listbox with files containing either of these words in the file content. I'd heard of GREP, but have never used it. Google returns a BUNCH of hits, so I'll be happily searching through these today. Sounds like something that I would expect to shell to (?) in order to output a text file report, which I could then parse. Thanks, again, for the help. Dave wrote: > "Patrick Pirtle" <p**@skilling.com> wrote in message The impossible just takes a little longer> news:OWBpEEagFHA.2700@TK2MSFTNGP15.phx.gbl... >> What I'd like to do is search the files that are populating >> my treeview for text. > > Still need more info, by search do you mean file names or file > content? [snip] --------------------------------------------------------
Show quote
Hide quote
"Patrick Pirtle" <p**@skilling.com> wrote Yeah, something like that should be possible, for an example,> > I'd like to be able to search for "treeview OR tree-view" and > have it populate a listbox with files containing either of these > words in the file content. > > I'd heard of GREP, but have never used it. Google > returns a BUNCH of hits, so I'll be happily searching > through these today. Sounds like something that I > would expect to shell to (?) in order to output a text > file report, which I could then parse. > > Thanks, again, for the help. launch the command processor and navigate to a directory that has a few forms in it. Then try this line to list all VB modules that contain the word "Dim" for %f in (*.frm; *.bas; *.cls) do find /c "Dim" %f To send the results of just the form files to a file: for %f in (*.frm) do find /c "Dim" %f >> found.txt OK, if that works as planned, you can call that from VB using: Private Sub Command1_Click() Dim cmd As String cmd = "for %f in (*.frm; *.bas; *.cls) do find /c ""Dim"" %f >> found.txt" ' Changing current DIR for ease of use.... ChDrive "E:" ChDir "E:\Projects\VB Development\Source Code" Shell Environ("COMSPEC") & " /c " & cmd, vbHide End Sub If your file names have spaces in their names, then surround the final %f with quotes: cmd = "for %f in (*.frm; *.bas; *.cls) do find /c ""Dim"" ""%f"" >> found.txt" That should give you a file you can then read in and parse.... A bit of a run-around, but its easier than writing the code yourself! If you are familiar with regular expressions, you might also look into the FindStr command, otherwise using that once for "treeview" and again for "tree-view" should get you the desired results. HTH LFS very clever! this of course doesn't work on pdf files, though.
lance Show quoteHide quote "Larry Serflaten" <serfla***@usinternet.com> wrote in message news:etHJsjkgFHA.2644@TK2MSFTNGP09.phx.gbl... > > "Patrick Pirtle" <p**@skilling.com> wrote >> >> I'd like to be able to search for "treeview OR tree-view" and >> have it populate a listbox with files containing either of these >> words in the file content. >> >> I'd heard of GREP, but have never used it. Google >> returns a BUNCH of hits, so I'll be happily searching >> through these today. Sounds like something that I >> would expect to shell to (?) in order to output a text >> file report, which I could then parse. >> >> Thanks, again, for the help. > > > Yeah, something like that should be possible, for an example, > launch the command processor and navigate to a directory that > has a few forms in it. Then try this line to list all VB modules that > contain the word "Dim" > > for %f in (*.frm; *.bas; *.cls) do find /c "Dim" %f > > To send the results of just the form files to a file: > > for %f in (*.frm) do find /c "Dim" %f >> found.txt > > OK, if that works as planned, you can call that from VB using: > > > Private Sub Command1_Click() > Dim cmd As String > > cmd = "for %f in (*.frm; *.bas; *.cls) do find /c ""Dim"" %f >> found.txt" > > ' Changing current DIR for ease of use.... > ChDrive "E:" > ChDir "E:\Projects\VB Development\Source Code" > Shell Environ("COMSPEC") & " /c " & cmd, vbHide > > End Sub > > > If your file names have spaces in their names, then surround the final > %f with quotes: > > cmd = "for %f in (*.frm; *.bas; *.cls) do find /c ""Dim"" ""%f"" >> found.txt" > > That should give you a file you can then read in and parse.... > > A bit of a run-around, but its easier than writing the code yourself! If you > are familiar with regular expressions, you might also look into the FindStr > command, otherwise using that once for "treeview" and again for "tree-view" > should get you the desired results. > > HTH > LFS > > > > > > > Patrick,
Check out www.isedquickpdf.com. I haven't really used it, but seems like you can do pretty much anything on .pdfs from VB. NickHK Show quoteHide quote "Lance" <nu***@business.com> wrote in message news:#UZzELngFHA.272@TK2MSFTNGP15.phx.gbl... > very clever! this of course doesn't work on pdf files, though. > > lance > > "Larry Serflaten" <serfla***@usinternet.com> wrote in message > news:etHJsjkgFHA.2644@TK2MSFTNGP09.phx.gbl... > > > > "Patrick Pirtle" <p**@skilling.com> wrote > >> > >> I'd like to be able to search for "treeview OR tree-view" and > >> have it populate a listbox with files containing either of these > >> words in the file content. > >> > >> I'd heard of GREP, but have never used it. Google > >> returns a BUNCH of hits, so I'll be happily searching > >> through these today. Sounds like something that I > >> would expect to shell to (?) in order to output a text > >> file report, which I could then parse. > >> > >> Thanks, again, for the help. > > > > > > Yeah, something like that should be possible, for an example, > > launch the command processor and navigate to a directory that > > has a few forms in it. Then try this line to list all VB modules that > > contain the word "Dim" > > > > for %f in (*.frm; *.bas; *.cls) do find /c "Dim" %f > > > > To send the results of just the form files to a file: > > > > for %f in (*.frm) do find /c "Dim" %f >> found.txt > > > > OK, if that works as planned, you can call that from VB using: > > > > > > Private Sub Command1_Click() > > Dim cmd As String > > > > cmd = "for %f in (*.frm; *.bas; *.cls) do find /c ""Dim"" %f >> found.txt" > > > > ' Changing current DIR for ease of use.... > > ChDrive "E:" > > ChDir "E:\Projects\VB Development\Source Code" > > Shell Environ("COMSPEC") & " /c " & cmd, vbHide > > > > End Sub > > > > > > If your file names have spaces in their names, then surround the final > > %f with quotes: > > > > cmd = "for %f in (*.frm; *.bas; *.cls) do find /c ""Dim"" ""%f"" >> found.txt" > > > > That should give you a file you can then read in and parse.... > > > > A bit of a run-around, but its easier than writing the code yourself! If you > > are familiar with regular expressions, you might also look into the FindStr > > command, otherwise using that once for "treeview" and again for "tree-view" > > should get you the desired results. > > > > HTH > > LFS > > > > > > > > > > > > > > > > Nick -
Thanks for the link. NickHK wrote: Show quoteHide quote > Patrick, > Check out www.isedquickpdf.com. I haven't really used it, but seems > like you can do pretty much anything on .pdfs from VB. hello!
the following links could match your needs: FindFile ActiveX COM Object Component: (without index) http://www.tutorial-web.com/asp/components/findfile.asp DotLucene 1.9 - The Open Source Search Engine for .NET (with index) http://www.dotlucene.net/ the integration of other fileformats can be done with IFilters afaik here are some links about IFilter http://www.greghughes.net/rant/IFiltersFindingInformationInsideYourFiles.aspx http://channel9.msdn.com/wiki/default.aspx/Channel9.DesktopSearchIFilters http://addins.msn.com/devguide.aspx#AddingaNewFileTypehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/indexsrv/html/ixrefint_9sfm.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/indexsrv/html/ixufilt_912d.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/ODC_HowToWriteaFilter.asp http://blogs.msdn.com/michkap/archive/2005/03/08/389675.aspx http://sqljunkies.com/WebLog/acencini/articles/716.aspxhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/indexsrv/html/ixrefint_5ar6.asp you may also use the copernic desktop search API to control it's search-functions if that fits your needs. does somebody know a search engine with .NET interface like lucene that supports searches without index? bye, josef Show quoteHide quote "Patrick Pirtle" wrote: > I've written an app that does nothing more than provide > me with a treeview showing files of various formats in > a folder tree. These files may be PDFs, ASCII text, > HTML, mail messages, etc. What I'd like to do is to > add some sort of a search function to my app. > > Is it likely I can find some sort of search control to add, > or would I have to write something on my own (the > latter being daunting to me, to say the least)? > > TIA for any suggestions or help. > -------------------------------------------------------- > The impossible just takes a little longer > > >
Functional IDE DLL call compiles to non-functional DLL call
Problem comparing double values Programatically design a form Testing for MAPI , again Verify a person's name? Date Time Picker Question VB 6 UCase failing Compile Error: Can't find project or library data structure equality Default Property in VB6 Class Name of Control under to mouse pointer |
|||||||||||||||||||||||