Searching for files

brechtjah

Member
Joined
Mar 23, 2008
Messages
23
Programming Experience
Beginner
Hi,
I'm also at work at a program where you can store synonyms in. Although I'm getting one problem, I want the user to enter a word (the word he's looking for) in the textbox. However, I also want if the user enters for instance: "e", he gets all the files that start with "e", so I guess this is something with the *-sign. I've tried this:
VB.NET:
If My.Computer.FileSystem.FileExists(Application.StartupPath & "\" & strZoekWoord & * & ".scb") = True Then
However, this does not seem to work :(, I really don't know what keywords I should use on google. So I thought I just as well asked here :)
Hope you guys know what to do.

Thanks :)
 
Using the code you posted, it would not work. You would want to iterate over the files in whatever folder you are looking in, get the file name and check if the file_name.Text.StartsWith(strZoekWoord). If you want it to also have the .scb file extention check that as well.
 
Back
Top