Search the File system

  • Thread starter Thread starter Stewart Saathoff
  • Start date Start date
S

Stewart Saathoff

Hello,

I am trying to search the file system from a string of text located inside
of a textbox on a form and have it return a list of file names in a list box
on that same form. Does anyone know where I can find a sample of that?

Thanks

Stewart
 
Hi Stewart,

There are a lot of different methods in VB.net to search a string.
It's a matter of preference what to use.
If you search in the help for
String members (indexof, lastindexof, indexofany..................
Regex
Microsoft.Visual Basic functions (Instr)
Find object
than I think you will find what you fits the most.

In my opinion the simplest are
String members and Microsoft Visual Basic functions.

I hope this helps a little bit.
Cor
 
This is not exactly what I am looking for. I wanted to know how to search
the file system. I know how to run a qyery based off of a string. What I
need to know is how to access the file system in a way that I can search for
a file in a specified area.

Thanks for the help though.
 
Hello,

Stewart Saathoff said:
This is not exactly what I am looking for. I wanted to
know how to search the file system. I know how to run a
qyery based off of a string. What I need to know is how
to access the file system in a way that I can search for
a file in a specified area.

I have posted you links to some samples in the other ng. Have a look at the
classes contained in the 'System.IO' namespace, 'Directory',
'DirectoryInfo', 'StreamReader' etc.
 
Stewart Saathoff said:
This is not exactly what I am looking for. I wanted to know how to
search the file system. I know how to run a qyery based off of a
string. What I need to know is how to access the file system in a
way that I can search for a file in a specified area.

Have a look at the classes in the namespace System.IO

See also:

Visual Studio.NET
Visual Basic and Visual C#
Reference
Visual Basic language
Visual Basic Language Tour
-> Processing drives, folders and files
.NET Framework
Programming with .NET Framework
-> Working with I/O

(see hints in signature)
 
Back
Top