473,499 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

borland findfirst not sorting by file age

I have a program which manages various log files of multiple
extensions. The program needs to delete files based on an age paramter
and a file number limit paramter. So if files are older than say a week
they get deleted, and if my max file number limit is 1000 and I have
1200, I delete 200 files, starting with the oldest. Findfirst and
findnext work great for putting the files into a list when there is
only one file type. They will load them from oldest to youngest, thus
they are sorted and all I do is start deleting from the beginning of
the list. However when I have more than one file type in my directory
it doesn't load them by age. It first loads all of one type of file,
oldest to youngest, then all of the next type of file, oldest to
youngest and so on. So if I try to trim them down to be under my max
file limit I end up deleting all of the first type of file, even if
they are younger than some of the second type. Obviously I could make
my own list by looping through all the first and doing a sort, but this
seems to time consuming. Eventually this program will manage thousands
of files all at once and this routine runs in a loop about once a
second, so adding another loop to go through and sort 10,000+ files
will probably be too time consuming.

Does anyone know of an alternative to findfirst/findnext that will work
in borland win32 and sort files by age only and will work with
thousands of files?

Feb 21 '06 #1
1 2916
bmshirey wrote:
[...]
Does anyone know of an alternative to findfirst/findnext that will work
in borland win32 and sort files by age only and will work with
thousands of files?


Your question is off-topic here. Please post it to a Borland or to
a Win32 programming newsgroup.

V
--
Please remove capital As from my address when replying by mail
Feb 21 '06 #2

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

Similar topics

17
4662
by: Ziggi | last post by:
Hi. I want to get a C++ IDE, but I dont know whether to go for Bill Gate's solution or Borland's. Could any kind folks detail the relative strength and weaknesses of both, and also tell me which...
2
2173
by: kikotores | last post by:
I am going back home for the summer but I have this big project to submit for one of my classes. It is written in Visual C++ 7.0 . Hoever the only C++ compiler I have at home is the free Borland...
5
33333
by: Paul | last post by:
The 2 statements below work perfectly when using them individually. But when I try to concatenate them, they don't. rst.FindFirst " = " & OldQuoteNumber rst.FindFirst " Is Null" Can someone...
1
1642
by: Shaun | last post by:
Hi all Simple question re .findfirst Is it true it does not use any indexes and really the best option with a SQl backend (ignoring using Stored Procedures which at this stage has not been...
17
7189
by: Fabry | last post by:
Hi All, I'm new of this group and I do not know if this is the correct group for my question. I have a DLL with its export library (.lib) wrote in Borland C++ 6. In borland everything is OK and...
0
1695
by: jairathore | last post by:
Hi to all, I m very much novice the borland c++ envoirment i want to build a application whose code is devloped in borland c++ ,i have make file associated that application.i tried to compile this...
25
3886
by: Rick Collard | last post by:
Using DAO 3.6 on an Access 2002 database, I'm getting unexpected results with the FindFirst method. Here's the simple code to test: Public Sub FindIt() Dim db As Database, rs As Recordset...
0
2301
by: bitstreamer | last post by:
Greetings everybody, I'm trying to UNDERSTAND this code. I've already done lots and lots of debugging sessions and I can confirm that the FIND_NEXT routine is never executed. Every file entry...
5
4901
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
7134
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
7014
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
7180
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
5485
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
4921
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
4609
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
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
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.