AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to Computer Support/Help/Discussion...  <--  <--- Return to Home Page
   Networked Database  Computer Support/Help/Discussion...   [868 / 1577] RSS
 From   To   Subject   Date/Time 
Message   Nick Andre    All   Delold source code   July 26, 2023
 5:43 PM *  

Delold is a Freepascal program which deletes all but the X oldest file.

In heavy use here for Fido ZC1 stuff... enjoy.

Should be able to recompile for non-Windows and yes I'm sure theres plenty of 
room for improvement... This was written in one sitting after a few beers.

program delold;
uses dos;

var dirinfo : SearchRec;
count,newest : longint;

procedure Eraseit;
var f : file;
begin
 writeln('Erasing '+dirinfo.name);assign(f,dirinfo.name);erase(f);
end;

begin
  count:=0;
  writeln('Delold 1.0/Win32 Copyright (c) by Nick J. Andre, Ltd.';);
  writeln;
  if paramstr(1)>'' then
   begin
    findfirst(paramstr(1),archive,dirinfo);
    if DOSerror=0 then begin count:=count+1;newest:=dirinfo.Time;end;
    while (DOSerror=0) do
     begin
      findnext(dirinfo);
      count:=count+1;
      if dirinfo.Time>newest then newest:=dirinfo.Time;
     end;
    findclose(dirinfo);
    if count>1 then
     begin
      findfirst(paramstr(1),archive,dirinfo);
      repeat
       if (DOSerror=0) and (dirinfo.Time<newest) then eraseit;
       findnext(dirinfo);
      until (DOSerror<>0);
      findclose(dirinfo);
     end;
   end
   else
   begin
    writeln('Usage: DELOLD [filemask]';);writeln;
    writeln('DELOLD delete the oldest occurances of the mask specified.';);
   end;
end.

Nick

--- Renegade vY2Ka2
 * Origin: Joey, do you like movies about gladiators? (618:500/24)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to Computer Support/Help/Discussion...  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0154 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.1.220106