🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13085

Best way to approach text search

#13085
From: Victor G. Baron
Date: Sun, 26 Oct 2003 05:20
27 lines
1811 bytes
Using BCB5/ XPPRO


What's the best way to approach this problem?

I have a folder with several hundred files. There are other folders containing
quite a few CFG text files which contain one or more of the filenames in the
original folder. I am making a "cleanup" utility. I want to read the filenames
into a stringlist and then step through the list and search the CFG files for a
match, making a list of those that are NOT found in any of the CFG files.
Ultimately I will delete these files from the original folder.

I'm looking for the most efficient way to do this. I plan on using the
Findfirst(), FindNext() to populate the Stringlist. My question is more the best
way to approach the text search of the files. The obvious way to me is to use
FindFirst(), FindNext() to get each file and scan it and go to the next.

Is there a better way?

Thanx,

Vic Baron


-- 
Vic Baron
I haven't lost my mind, it's backed up on disk somewhere!
Technical Details
Message-ID: <7ilmpv4s0cf2lav5mb7fi3rbk2tnaadlpc@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,1c9cd5145f5a4999,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-25 22:38:52 PST
From: Victor G. Baron <vgbaron@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Best way to approach text search
Date: Sat, 25 Oct 2003 22:20:34 -0700
Message-ID: <7ilmpv4s0cf2lav5mb7fi3rbk2tnaadlpc@4ax.com>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.170.59.112
X-Trace: newsgroups.borland.com 1067145626 64.170.59.112 (25 Oct 2003 22:20:26 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail