Important alert: (current site time 7/16/2013 3:44:14 AM EDT)
 

winzip icon

Search for file(s) on a Drive with API

Email
Submitted on: 4/2/2000 1:12:22 AM
By: Michael L. Canejo  
Level: Intermediate
User Rating: By 16 Users
Compatibility: VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 20595
author picture
(About the author)
 
     My coding actually does several things. The main thing is that it can search an entire Drive and all of its Directories for a file you specify and at the end of the search display the results of it. Or you can do the same thing but this time look for any file with an extention you specify. I made this search for the file using API but I left a function in there you can edit to search for the files without API but it's a little slower and not recommended. This Screen Shot can pretty much explain it all...

E-mail: mikecanejo@hotmail.com AIM: Mike3dd

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 45 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
4/2/2000 9:08:42 PMmdscs

HECK YA!
(If this comment was disrespectful, please report it.)

 
4/4/2000 10:23:47 PMWackowoh

1. Nice code, 5 globes.
2. i was wondering, why did you give me only 1 globe on my Mp3 Player? http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=6967
(If this comment was disrespectful, please report it.)

 
4/16/2000 10:59:18 AMCool Man

I finally find something like this! thanx man!
(If this comment was disrespectful, please report it.)

 
4/17/2000 6:58:35 PMMike Canejo

Thank you!If anyone of you
programmers are advanced enough you
could make this scan files while it
searches the Drive for Virus(s) or
Deltrees or PWS's etc.. just a
thought
-Mike

(If this comment was disrespectful, please report it.)

 
4/23/2000 8:33:01 PMPBFJ@Hotmail.com

I dont know if it is just me, but i can't get it to work, When i for example enter NotePad where
(If this comment was disrespectful, please report it.)

 
4/23/2000 8:34:37 PMPBFJ@Hotmail.com

I dont know if it is just me, but i can't get it to work, When i for example enter NotePad where "Example" was before and click "Search" nothing happens beside the form is getting larger.Please help me.........
Thanks Paw(DK)
(If this comment was disrespectful, please report it.)

 
8/29/2000 12:25:56 PMAdel Bamohriz

To get this great code working you may need to add some lines in [Private Sub cmdgo_Click()], exactly next to this line of code:
lstdirs.AddItem Drive1.Drive
(If this comment was disrespectful, please report it.)

 
8/29/2000 12:31:01 PMAdel Bamohriz

the lines which to be added in the code are:
'***
If Len(lstdirs.List(0)) > 2 Then
lstdirs.List(0) = Mid(lstdirs.List(0), 1, 2)
End If
'***
(If this comment was disrespectful, please report it.)

 
3/3/2002 11:31:09 PMMoumen

can u tell me how to create a program that search my ftp site for mp3? please someone help me
(If this comment was disrespectful, please report it.)

 
5/8/2002 6:16:59 PMNick

Can this be implemented in an error handler function, like say someone moves one of your support files, an image or something, can you a vb scan the drive for that file, and load it into your application from its new location and then save the path as that files new location?
(If this comment was disrespectful, please report it.)

 
10/29/2002 7:34:28 PM

all the code and an example can be found here http://internettrash.com/users/fdb/apifile.htm that one works fine is the same programming as this one lol so dunno who copied off who?
(If this comment was disrespectful, please report it.)

 
8/7/2005 8:20:35 AMNorm Cook

Contest Winner? Trim$(FindData.cFileName) will not remove the Chr$(0)'s in the Filename. Since cFileName is a buffer of length MAXPATH(260), the Filename must be extracted with something like Filename=Left$(FindData.cFileName, Instr(FindData.cFileName,vbNullChar)-1)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.