Archivovaná správa #1237 diskusnej skupiny ecs-isp@2rosenthals.com | ![]() ![]() |
|
---|
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.
Prihlási?: Nap??a?,
Súhrn,
Index. Odhlási? Mail na ListMastera |