473,513 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

search file that containing especific text

Hi,

I need to seach all files in a folder that contain an specific text.

Thanks

Boris
Nov 20 '05 #1
5 1316
RDI
Why not just do it in explorer? Or did you need to have one of your
functions do something on these files?

Not sure if there's a better way in VB.net but you COULD have a function
execute the dos level command "Find" and have it send it's output to a text
file. Then it's a simple matter of parsing the text file to get a list of
files that meet your requirements.

"Boris Bulit" <bu****@bellsouth.net> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
Hi,

I need to seach all files in a folder that contain an specific text.

Thanks

Boris

Nov 20 '05 #2
RDI
Why not just do it in explorer? Or did you need to have one of your
functions do something on these files?

Not sure if there's a better way in VB.net but you COULD have a function
execute the dos level command "Find" and have it send it's output to a text
file. Then it's a simple matter of parsing the text file to get a list of
files that meet your requirements.

"Boris Bulit" <bu****@bellsouth.net> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
Hi,

I need to seach all files in a folder that contain an specific text.

Thanks

Boris

Nov 20 '05 #4
* "Boris Bulit" <bu****@bellsouth.net> scripsit:
I need to seach all files in a folder that contain an specific text.


Code for file enumeration:

<http://www.mvps.org/dotnet/dotnet/samples/filesystem/downloads/RecursiveFileScan.zip>

Have a look at the classes in the 'System.IO' namespace, namely
'BinaryReader' and 'StreamReader' to read the contents of the files.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4189
by: Alastair | last post by:
Hello guys, I've been building a search facility for an intranet site I'm part of developing and we've been building a search engine using Index Server. It mostly works, however there have been...
0
280
by: Boris Bulit | last post by:
Hi, I need to seach all files in a folder that contain an specific text. Thanks Boris
2
4583
by: richardkreidl | last post by:
I want to be able to delete and search for elements in a XML file, I'm using the code below for adding elements which works great: Public Sub cmdAddElement_Click(ByVal sender As System.Object,...
3
9528
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
13
1877
by: Ray Muforosky | last post by:
Hello all: Task: I want to do file search, using the "conatining text" option from a web page. How do I search for a file on my local drive containing a certain string, from a web page. That...
5
2684
by: Mark | last post by:
Hi I have an application (in vb.NET 2005) which holds data in SQL Server and some of the SQL records are simply paths to related files. I would like to be able to do a text search on both the...
13
5948
by: Vai2000 | last post by:
Hi All, Planning to call the same search API which windows Search uses for searching , when u launch with Ctrl+F,you have the flexibility to provide a containing text! VB/C# any thing would work...
3
3542
by: =?Utf-8?B?UGVycmlud29sZg==?= | last post by:
Not sure where to post this... Found some interesting behavior in Windows Search (Start =Search =All files and folders =search for "A word or phrase in the file:"). This applies to XP and maybe...
0
10707
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
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7380
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
7523
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
5683
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,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.