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

Searching multiple files for text or phrases?

Hi all,
i want to search for files containing particular phrase, just like windows "A word or phrase in file:" utility in search option. Does anybody knows any windows API or programming logic for this issue?
Feb 11 '08 #1
4 1720
sicarie
4,677 Expert Mod 4TB
Depends which language you are using - will this be implemented in C or C++?
Feb 11 '08 #2
Studlyami
464 Expert 256MB
If your not concerned about memory you can open the file and copy it to a CString object then you can use the CString::find() to find the word or phrase. This can take up a lot of memory depending on the file size, but its really easy to program and for what i have noticed it doesn't take a lot of time on the find function, but i haven't used it on larger files (max was probably 30 or so pages of text).
Feb 11 '08 #3
Depends which language you are using - will this be implemented in C or C++?

it has to be implimented in C++. They are xml files and i have to search for value of particular node. Reading the file and using MSXML is better option or taking it in CString and calling .find() will be a better option.
Feb 12 '08 #4
sicarie
4,677 Expert Mod 4TB
Yeah, I'd use an XML parser, it sounds like you already know of one (though it's got the "M$" on the front of it, I wouldn't really trust it ;). Feel free to post again during your implementation if you get stuck!
Feb 12 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ash | last post by:
I want search phrase in html file and mark (like Google when I click on "cached") it (phrase). Does somebody know any class, that can help me? Maybe somebody know how could I make this? thanks
0
by: Tomas Ekroth | last post by:
Hi! Maybe this is a very stupid question. I'll try anayway. I'm using MySQL 3.23.52 on RedHat 8.0. I have a very big table (several millions of rows). Each entry actually constitute a word in...
4
by: Michi | last post by:
I was wondering what the best solution is for making large numbers of TEXT (or BLOB?) fields searchable. For example, if I have a forum, what is the best way to be able to search for specific...
3
by: Voetleuce en f?nsievry | last post by:
G'day I'm looking for a script that can search multiple instances of Google (or other search engines optionally). The user types in a single word in the text field, presses ENTER or the submit...
10
by: steve | last post by:
hi i am writing a C program which can read TEXT , PDF,.DOC files the program is to : count the number of words, lines, characters and the frequency of each word and the phrases count in...
7
by: D.M. Procida | last post by:
<http://www.w3.org/QA/Tips/noClickHeresays: When calling the user to action, use brief but meaningful link text that: * provides some information when read out of context * explains...
1
AaronL
by: AaronL | last post by:
Hello, I am developing a fun TTS program and I've run into a bit of a problem. Basically I am bringing in a list of sentences into a database and randomly selecting them, at the same time...
5
by: zr3cool | last post by:
heres the program description.... There exist two text files that are not identical with a size of between 100 and 250 characters. Write a c++ program that will read in these two text files,...
2
by: napsters | last post by:
Hello...I want to make something in VB (Version 9) that reads multiple data from specified file (Access 2007) and displays content in list box. If file doesn't exist, alert user. More...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
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
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
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
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.