• DELFILES utility

    From Psi-Jack@VERT to All on Wed Jul 1 09:32:00 2015
    So, I was wondering why, certain file bases I have setup to keep track of X number of files, but no max age, weren't getting deleted.. Specifically nodelist fileecho's and the likes.

    So it seems that DELFILES itself only acts on file bases that have an actual max age.. Is there no actual way to get delfiles to keep the latest X files and delete the older ones, without using the max age?

    )))[Psi-Jack -//- Decker]

    ... The one way sure to conciliate a tiger to allow oneself to be devoured

    ---
  • From Psi-Jack@VERT to Digital Man on Sat Jul 4 15:31:41 2015
    Re: DELFILES utility
    By: Digital Man to Psi-Jack on Fri Jul 03 2015 03:23 pm

    Re: DELFILES utility
    By: Psi-Jack to All on Wed Jul 01 2015 09:32 am

    So, I was wondering why, certain file bases I have setup to keep track
    of X number of files, but no max age, weren't getting deleted..
    Specifically nodelist fileecho's and the likes.

    So it seems that DELFILES itself only acts on file bases that have an
    actual max age.. Is there no actual way to get delfiles to keep the
    latest X files and delete the older ones, without using the max age?

    No, that is not a feature of delfiles. I'm not sure how that would work anyway: how would delfiles (or Sychronet) know that nlst001.zip was a never version nlst000.zip (or whatever the naming scheme was). Or were you thinking that all revisions of the same file would use the same filename?

    Hmmm, well, really, I was thinking of just by age alone, if a max number of files is setup and the file base exceeds that number, it would purge out the older files by the overall age of all the other files. I'm guessing that the filebase database has the date to which it was uploaded/added, so if, for example, in a NODELIST fileecho for FidoNet, I set Max Files to 12, I would effectively keep only the past 3 months of files, while older ones would be deleted.

    Purge By Age could do this similarly, yes, but it poses the potential problem that IF new files aren't being added, for whatever reason, you could end up with an empty directory should the problem persist and no new files ever get added appropriately.

    Thoughts?

    )))[Psi-Jack -//- Decker]

    ... Immortality--a fate worse than death.

    ---
    Synchronet Decker's Heaven -//- bbs.deckersheaven.co
  • From Psi-Jack@VERT to Digital Man on Sat Jul 4 20:41:31 2015
    Re: DELFILES utility
    By: Digital Man to Psi-Jack on Sat Jul 04 2015 04:20 pm

    No, that is not a feature of delfiles. I'm not sure how that would
    work anyway: how would delfiles (or Sychronet) know that
    nlst001.zip was a never version nlst000.zip (or whatever the
    naming scheme was). Or were you thinking that all revisions of
    the same file would use the same filename?

    Hmmm, well, really, I was thinking of just by age alone, if a max
    number of files is setup and the file base exceeds that number, it
    would purge out the older files by the overall age of all the other
    files. I'm guessing that the filebase database has the date to which
    it was uploaded/added, so if, for example, in a NODELIST fileecho for
    FidoNet, I set Max Files to 12, I would effectively keep only the past
    3 months of files, while older ones would be deleted.

    Purge By Age could do this similarly, yes, but it poses the potential
    problem that IF new files aren't being added, for whatever reason, you
    could end up with an empty directory should the problem persist and no
    new files ever get added appropriately.

    Thoughts?

    I never considered only purging older files when files are added. And since there aer so many ways to add files, that's probably not practical. The source code for DELFILES is in CVS and that functionality could be added relatively easy.

    Heh, well, if I knew C or C++, I'd definitely personally tackle it. And how files are added is relatively immaterial in general retrospect, as the idea is only to purge files by number of files, removing the oldest one. By using, as I mentioned, the uploaded date in the database, it doesn't matter if the file was uploaded by direct Zmodem upload, FTP upload, or addfiles utility, etc.. So long as the database details are correctly maintained..

    This could need two basic changes in general. One, a toggle in the configuration allowing to enable purging files by number, as it is now, that may not be desired in every file base, but every file base setting does have the max files option in it, and default to 10000 or so. Unless simply setting that to 0 would disable purging would suffice, a flag needs to exist for delfiles to be told to handle it, or so.

    And of course, modifying delfiles itself to do the process accordingly.

    )))[Psi-Jack -//- Decker]

    ... File not found. Should I fake it? (Y/N)

    ---
    Synchronet Decker's Heaven -//- bbs.deckersheaven.com