Archivovaná správa #1237 diskusnej skupiny ecs-isp@2rosenthals.com

Od: "Massimo S." <ecs-isp@2rosenthals.com> Celá hlavi?ka
Nedekódovaná správa
Hlavi?ka: Re: [eCS-ISP] script to rotate logs, old mails etc. and create a dated zip
Dátum: Sun, 12 Oct 2025 14:24:20 +0200
Komu: eCS ISP Mailing List <ecs-isp@2rosenthals.com>



Il 12/10/2025 08:23, Peter Moylan ha scritto:
On 10/10/25 01:18, Massimo S. wrote:
Hi all,

anyone have a good application or script to rotate files older than a
number of days and that create a zip file with the date in the
filename of the archive?

I don't find anything on hobbes.

The script
       http://www.pmoylan.org/pages/os2/waccess.html#movelog
does most of what you want. It adds the date to the filename and then
moves the log file to a subdirectory "Logs". I use the "schedule"
feature of DragText to run it once a day, but you could also schedule it
with something like cron.

As written, it archives the file called WEASEL.LOG, but it's obvious how
to change that in the script.

The feature that is missing is that it doesn't delete old archived
files. If you read the Rexx script, though, you'll find that it is very
simple code, and you could easily modify it to compare the file date
with the current date (these are very simple operations in Rexx), and
delete any file that is more than X days old.

i need something that achive all .MSG files to a ZIP archive with date
and after delete the .MSG

thanks, but i guess this script can't help me

massimo

Prihlási?: Nap??a?, Súhrn, Index.
Odhlási?
Mail na ListMastera