????????? #1245 ?????? ?????? ???????? ecs-isp@2rosenthals.com

??: "Steven Levine" <ecs-isp@2rosenthals.com> ?????? ?????????
?????????????? ?????????
????: Re: [eCS-ISP] script to rotate logs, old mails etc. and create a dated zip
????: Tue, 14 Oct 2025 12:07:51 -0800
????: "eCS ISP Mailing List" <ecs-isp@2rosenthals.com>

In <list-14422694@2rosenthals.com>, on 10/14/25
   at 09:15 AM, "Massimo S." <ecs-isp@2rosenthals.com> said:

Hi,

>I need to move to a zip archive (with the current date in the filename),
>all the .MSG files older than a certain date (eg. 365 days).

OK.  Peter did a better job of understanding your request than I did.

>I'm not able to write it myself.

Sure you can.  The others have provided useful suggestions.  The help
yourself with the coding and debugging, you need to use the available
tools.  The REXX say and trace statements are your friends.  There's also
rxd which is a gui debugger for REXX.

My scripts also turn on all the available error checking signals.  I am a
firm believer in letting my tools do as much of the debugging as they are
capable of.

>And all the stuff produced by Copilot is in a rexx that do not work
>properly, maybe it's regina rexx, but it's not compatible with our one.

Did you tell Copolit that you wanted a "IBM Classic REXX" script?  If you
only asked for a REXX script, there's no way for Copilot to know what you
really need.  I doubt Copilot yet can read your mind.

REXX, especally Classic REXX, is not all to good with handling date
ranges.  If would probably use 4OS2.  Since you run cmd.exe, something
lile

  4os2 /c dir /b /a:-d /[d-365,1-1-80] *.msg >oldfiles.nf
  zip -uo9 -m -@ oldfiles.zip <oldfiles.nf

will work once you debug it and correct any typos I might have provided.

Plug this into your REXX script that generates the zip file name and you
are close to done.

Steven

--
----------------------------------------------------------------------
"Steven Levine" <steve53@earthlink.net>  Warp/DIY/BlueLion etc.
www.scoug.com www.arcanoae.com www.warpcave.com
----------------------------------------------------------------------


???????????: ?????????, ????????, ?????????.
??????????
???????? ?????????????? ?????? ????????