Hello Gerald!
Quoting Gerald's message:
GM> Yup! I get an new ASCII Nodelist from my boss and I want to move it to
GM> my \NODELIST directory and at the same time, I want to move the old
GM> nodelist to my \OLDNODE directory (so there is only one nodelist for
hat
GM> particular Net in the directory at one time).
Is that nodelist produced on the same day (ie: Monday ... Friday) and is the
extension constant (ie: A##, Z##, etc. the ## representing the last two
digits of the Julian day number)?
GM> I had tried using the extension of the file, the date of the file,
GM> the size of the file and tried a comparison test of the two, with
GM> less than spectacular results. I think if I can use the date of the
GM> two files to do the comparison testing, this may yield more promising
GM> results.
GM> Have you got a solution?
I might have a solution that I have been using for years to process the newly
arrived FidoNet nodediff and delete the nodediff that is older than 21 days.
Note: This file is based on the Friday - to change the day of the week,
modify the value of the D_DAY variable according to the information.
*setlocal
:: Julian day setting
:: Setting VVOFD to the Friday, 21 days ago
set d_mod=-21^gosub setting^set vvofd=%xjd
:: Setting VOFD to the Friday, 14 days ago
set d_mod=-14^gosub setting^set vofd=%xjd
:: Setting OFD to the Friday, 7 days ago
set d_mod=-07^gosub setting^set ofd=%xjd
:: Setting OFD to the FidoNet nodelist/nodediff standard of A##
set aofd=A%@substr[%ofd,1,2]
:: Setting FJD to the latest (past/upcoming) Friday
set d_mod=-00^gosub setting^set fjd=%xjd
:: Setting FJD to the FidoNet nodelist/nodediff standard of A##
set afjd=A%@substr[%fjd,1,2]
:: Setting NFD to the Friday, 7 days from now
set d_mod=+07^gosub setting^set nfd=%xjd
:: Setting NFD to the FidoNet nodelist/nodediff standard of A##
set anfd=A%@substr[%ofd,1,2]
:: Setting TJD to today's Julian day
set tjd=%@substr[000%_doy,2,-3]
:: Setting TJD to the FidoNet nodelist/nodediff standard of A##
set atjd=A%@substr[%tjd,1,2]
goto [rest of the program]
:setting
:: D_DAY values:
:: Tuesday = 0
:: Wednesday = 1
:: Thursday = 2
:: Friday = 3
:: Saturday = 4
:: Sunday = 5
:: Monday = 6
set d_day=3
set d_mod=%@eval[%@date[%_date] %d_mod+0]
set d_up=%@eval[%d_mod %% 7]
iff "%d_day" != "" .and. %d_day. != %d_up. then
if %d_day gt %d_up set d_up=%@eval[%d_up+7]
set d_mod=%@eval[%d_mod-(%d_up-%d_day)]
endiff
set tdate=%@makedate[%d_mod]
set xjd=%@substr[000%@eval[%@date[%tdate]-%@date[1-1-%@substr...
...[%tdate,1,-2]]+1],2,-3]
return
:[rest of the program]
Note the line ending with the ... and the line starting with ... - this
should be on one line only by removing the six dots.
Sincerely, Raymond Beriau.
Co-Moderator 4DOS
INFODATA Communications [+1 514 432 8467]
... @TAGLINES.LSTS.LSTS.LSTS.LSTS.LSTS.LST
--- GoldED 3.00.Beta3+
---------------
* Origin: INFODATA Communications - 4DOS Support (FidoNet 1:242/105)
|