473,326 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Need Help (Search Program)

Hi there, am having trouble with my program, its a file locator program just like a search engine in a local drive:
heres wat i have coded:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. Dim SearchFile As String
  3. Dim FileName As String
  4.  
  5. If Drive1.Drive = "c:" Then
  6.     SearchFile = Dir$("C:\*.*")
  7.         While SearchFile <> ""
  8.             List1.AddItem (SearchFile)
  9.             SearchFile = Dir$
  10.         Wend
  11. End If
  12.  
  13.  
  14. End Sub
but only display single file on my drive c:. and it doesnt compare the file that i'am looking for. the output of this code is always the same. Thing is it doesnt look inside a folder.

So my question is 1.) How i'am able to search a file inside a folder and display it
2.) How iam able the to look for a specific file in my drive c:, by in-putting a filename in a textbox. i hope u can picture what i'am trying to do.


Hoping for an immediate help! thank you....
Mar 13 '07 #1
2 1056
willakawill
1,646 1GB
Hi. What is Drive1?
Mar 15 '07 #2
Killer42
8,435 Expert 8TB
Hi. What is Drive1?
If it's a DriveListBox control, then your If test may miss it. In my case, the .Drive property returns a string containing the drive letter as in your example, followed by the volume name, in the format "c: [xxxxxx]". Testing If "c:" = "c: [xxxxxx]" would certainly not produce a match.

Have you checked the value?
Mar 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: vic | last post by:
My manager wants me to develop a search program, that would work like they have it at edorado.com. She made up her requirements after having compared how search works at different websites, like...
3
by: sandrina | last post by:
Hello everyone, My name is Debi and I am an Administrative assistant with a large company in their sourcing department. I was hired one month ago, and walked in to a HUGE filing nightmare. My...
8
by: hothead098 | last post by:
ASSIGNMENT (4) USING AND MANIPUPATING ARRAYS (Chapter 10 material) For this assignment you are to: 1) Create and manage arrays a) One of type integers (containing 10 elements). b) One of...
66
by: genestarwing | last post by:
QUESTION: Write a program that opens and read a text file and records how many times each word occurs in the file. Use a binary search tree modified to store both a word and the number of times it...
4
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last...
9
by: MabZiCLe | last post by:
Hi .... i have a problem... i need to know how to make this program, using arrays only, maybe no function calls . also it must be in line code. well, this is the program. Create a...
4
memoman
by: memoman | last post by:
Can any body help me in that program ??? mail me if anybody could reach any -helpfull- thing Write a C++ program that namely insert, delete, and search in a fixed record length file (containing...
2
by: parasuram | last post by:
Hi friends ............. this is a question regarding the data structures trees Pleas post it if possible with in 2 days I will thankful if some body could help doing this. Operating...
0
by: khaleelrashid | last post by:
I would be very thankful if anyone do this till 30 dec Write a C++ program that contains a structure named “Account” having four data members 1) Account number 2) Account holder name...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.