473,396 Members | 2,158 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,396 software developers and data experts.

Search the File system

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
5 4812
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
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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rafael Nenninger | last post by:
This question has to do with MS file search but it is happening only with ..asp pages, so I though someone programming with .asp pages has experienced the same situation. I'm trying to find .asp...
3
by: RiceGuy | last post by:
Hi! I'm looking for ideas on what would the best approach to design a search system for a RSS feeds. I will have some 50 RSS feeds (all RSS 2.0 compliant) stored locally on the web server. Now I'm...
60
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't...
8
by: stunna | last post by:
Hi there, i want to implement a a system to search for a file in a folder using the file name and if its there, i want it to be displayed. I have one through a couple of books on how to implement...
2
by: Timmy | last post by:
The bigger problem is with the Binary Search. The program crashes when it's excuted. and Visual Studio 2005 indicates stack over flow and shows a break at that function. Sequential search is...
3
by: tonydraper | last post by:
I have built a website and for some reason the search facility has stoppped working? When I carry out a job search the page that it redirects to comes up with this. Source Error: Line...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
11
!NoItAll
by: !NoItAll | last post by:
I need to search a buffer for a string of characters. The buffer is essentially a binary file (it's an image) and contains lots of chr(0) characters. The string I need to locate also contains...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.