Title: FileFind Description:
I built this utility as a replacement to the default windows search. It contains the same basic functionality as the windows search. It allows you to search by a whole/part of a file name and/or by as string within a file. It displays the search results in a List View and allows you to export the results to Excel (FYI…it uses late binding so Excel is not required to run the Utility). Features:
Search by all or part of a file name
Search by a string within a file
Can export results to Excel (FYI…it uses late binding so Excel is not
required to run the Utility)
Can open any file found
Can open the directory of any file found
Allows you to pause/resume the search
Allows you to cancel the search
Optional – Get a count of how many times a string appears within the found file
Optional – Search case sensitive
Optional – Include Sub folders in search
Screen Shots:
Author: Sean Lodespoto A.K.A ProphetBeal System Requirements:
This code was written in VB.Net 2003 (V 1.1), so to view the code you need that version or above
To use the executable you need at minimum the .Net Framework Version 1.1
License Info:
You can use my Utility or parts of the code where ever you want, but GIVE CREDIT WHERE IT’S DUE.
Last edited by ProphetBeal; Mar 20th, 2009 at 12:50 PM.
Please post some of the code you need help with (it makes it easier to help you)
If your problem has been solved then please mark the thread [RESOLVED].
Don't forget to Rate this post
"Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-
Looks awesome. Tried to run a simple search and got the following error:
"cmdBeginSearch_Click Error: Cross-thread operation not valid: Control 'stbSearchInfo' accessed from a thread other than the thread it was created on."
I ran it in 2008 Express. Should that make any difference?
I'm not quite sure why you are getting that error. There could be an issue that the 3.5 framework imposes more security than the 1.1. I'll have to take a look at this, when I get a chance. The example I provided above is pretty old and actually I forgot it was even here, so I'll update it soon.
Please post some of the code you need help with (it makes it easier to help you)
If your problem has been solved then please mark the thread [RESOLVED].
Don't forget to Rate this post
"Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-
Please post some of the code you need help with (it makes it easier to help you)
If your problem has been solved then please mark the thread [RESOLVED].
Don't forget to Rate this post
"Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-
Please post some of the code you need help with (it makes it easier to help you)
If your problem has been solved then please mark the thread [RESOLVED].
Don't forget to Rate this post
"Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-
Hey ProphetBeal thanks for the Software, works great
I've managed to blend it in with a program i wrote and have stumbled across a few questions you might be able to help me with.
1) can i change the search criteria so that it only searches through files that have extension *.lst. I've done this for my program but i have no idea where to start editing your code, i'm self taught
2) Can i modify the "Right click" menu of each item found. i.e. i want to disable export to excel and maybe add a custom feature.
3) Can i modify the "double click" routine so that it copies the file name to another textbox on my program. ie: if i find file....C:\MyFolder\TF12345.lst i want to store "12345" in a text box on my form for later use.
4) For some reason the status bar at the bottom wont display the current status. All i did was copy it directly from your form to mine and made sure i have all relevent code in the background. It looks as though the "tooltips" and "statustext" are being changed properly but not displaying. Any ideas how or why this could happen?
5) How would you like me to Credit all your great efforts in providing this code for us not so clever to use Have u got a sig or pic or anything? So far i've added your name to the "aboutbox" in my program.
Well i know thats a lot of questions so i dont expect u to answer them all at once or even answer all of them, so having said any help is much, much appreciated.
1) can i change the search criteria so that it only searches through files that have extension *.lst. I've done this for my program but i have no idea where to start editing your code, i'm self taught
In my app there is a text box for just that purpose. The control name is "txtFileName" and it's labeled on the form as "All or part of the file name:"
Originally Posted by ja2984
2) Can i modify the "Right click" menu of each item found. i.e. i want to disable export to excel and maybe add a custom feature.
You need to edit the "cmnOpenResults" context menu control
Originally Posted by ja2984
3) Can i modify the "double click" routine so that it copies the file name to another textbox on my program. ie: if i find file....C:\MyFolder\TF12345.lst i want to store "12345" in a text box on my form for later use.
Sure, that would be done in the "lsvFilesFound_DoubleClick" Sub
Originally Posted by ja2984
4) For some reason the status bar at the bottom wont display the current status. All i did was copy it directly from your form to mine and made sure i have all relevent code in the background. It looks as though the "tooltips" and "statustext" are being changed properly but not displaying. Any ideas how or why this could happen?
I can't really say why this isn't working. If your app isn't multi-threaded correctly that could have something to do with it (IE the screen isn't getting refreshed because the thread is busy).
If you want more with this issue I suggest creating a thread in the VB.NET forums and post some of your code there.
Originally Posted by ja2984
5) How would you like me to Credit all your great efforts in providing this code for us not so clever to use Have u got a sig or pic or anything? So far i've added your name to the "aboutbox" in my program.
A note at the top of your code with my name and a link to this thread would be more than enough.
Please post some of the code you need help with (it makes it easier to help you)
If your problem has been solved then please mark the thread [RESOLVED].
Don't forget to Rate this post
"Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-
Thanks ProphetBeal, i'll have a look into the answers and see if i cant nut out what i need.
I'll do dome more research on why my status bar is not working, basically what u said about the thread being busy went over my head (giraffes fart) hehe.
I'll add your details and link to my code and about form.
- In the first textbox ("A word or phrase within the file") : the software finds some fakes results (the word that I choose isn't in the PDF Files).
It scans the binary versions of the files, so I will bet if you use Notepad to open the PDF in question and search for that text it will find it. I'm not really sure how to avoid this. Any suggestions are welcome.
Originally Posted by AsyLuM
- In the second textbox ("All or part of the file name") : so as to find a file, I have to put an * just before and after my search.
Not sure what the issue here is. Are you saying you don't like using "*"? The built in windows searches use a similar methodology "*.pdf" will only search PDF files.
Please post some of the code you need help with (it makes it easier to help you)
If your problem has been solved then please mark the thread [RESOLVED].
Don't forget to Rate this post
"Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-
Indeed, when I try to open PDF files with notepad, it shows me some misunderstanding thing like this,"OaóÕ¶jë…õy±¬Èénr*". And , by chance, there is the letters association I'm looking for but not really the word.
I'm sorry but I can't help you to improve your software.
according to the PDF file problems, I've find the code of stanav ! ( add reference : itextsharp.dll (the 4.0.1 works better than the last with my VS2008) and SharpZipLib.dll)
This latter finds the text in the PDF and puts it in a string value.
Can you tell me how to adapt it to your code ?
Thank you.
PS : Sorry for my bad english.
Julien.
Last edited by AsyLuM; Apr 23rd, 2010 at 12:53 AM.