473,626 Members | 3,198 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 2925
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
4695
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 you yourselves prefer. Thanks in advance. Ziggi
2
2186
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 Command line compiler (bcc32). I tried compiling my project with it but I got a bunch of nasty messages such as vector include file not found and stuff like that. I change the include directive to <vector.h> , <map.h> and so on but it still did not...
5
33349
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 please let me know how its done. Thanks in advance.
1
1653
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 funded) is to open recordsets with specific SQL to retreive small recordsets (and EOF indicating .nomatch) I found a conversion from Access to SQL caused soem of the .FindFirst calls to become really slow, tabels are indexed correctly. Initial tests...
17
7225
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 I am able to include the lib and use the class that i have exported creating an instance with new etc... I would like to export this class in microsoft VC++ using the same .lib file. Obviously it doesn' t work.
0
1712
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 make file sucessfullly using borland command line compiler but the problem is like that it generate me output as .exe file but i need output as .dll file (because native iterface i can use it some where)when i compile the make file. i kow this...
25
3909
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 Dim sCriteria As String Set db = DBEngine.Workspaces(0).Databases(0) Set rs = db.OpenRecordset("tblTest", dbOpenDynaset)
0
2317
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 is found using the FindFirst procedure, which is a bit odd. This small app was nicked from The SNIPPETS DOS archives, which is a bit broken atm but you can still download the code from the "naked" file archive. I've tried to implement a global...
5
4932
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 there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6125
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1511
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.