473,466 Members | 1,391 Online
Bytes | Software Development & Data Engineering Community
Create 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 1310
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
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
by: Boris Bulit | last post by:
Hi, I need to seach all files in a folder that contain an specific text. Thanks Boris
2
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
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
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
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
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
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
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.