By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Search the File system

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Cor
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
Nov 20 '05 #2

P: n/a
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.

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader20.wxs.nl...
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

Nov 20 '05 #3

P: n/a
Cor

"Stewart Saathoff"

That is much easier to give

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps
Cor
Nov 20 '05 #4

P: n/a
Hello,

"Stewart Saathoff" <st******@complete-networking.com> schrieb:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5

P: n/a
"Stewart Saathoff" <st******@complete-networking.com> schrieb
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)
--
Armin

- The tree representing the table of contents has been translated from
localized (German) version. Excuse slight deviations.

Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.