TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: ALL
from: Gerald Miller
date: 2003-12-30 19:41:58
subject: Multiple NodeDiff files

Path: internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.tpinternet.pl!news.atman.pl!news.intercom.pl!f124.n480!f127.n480!f112.n480!f200.n2432!f605.n774!f500.n123!f2000.n106!f1.n140!f5.n342!f512.n342!not-for-mail
Newsgroups: fido.4dos
Distribution: fido
From: Gerald Miller 
Date: Tue, 30 Dec 03 19:41:58 +0100
Subject: Multiple NodeDiff files
Message-ID: 
Organization: Aural Sex: Eargasms!
 2443/1181
Lines: 55
Xref: intern1.nntp.aus1.giganews.com fido.4dos:502

* Originally in 4DOS
* Crossposted in BATPOWER

Hello All,

Further, to my original message of Dec 24th, 2003:

=== Begin Cut: NODEDIFF.BTM ===
::  AllFix tosses the NodeDiff archive into the C:\Fd\Incoming\Pending\
::  directory for processing by this BTM.
iff exist C:\Fd\Incoming\Pending\NODEDIFF.* then
   set d_mod=-00 %+ gosub setting %+ set fjd=%xjd
   pkunpak C:\Fd\Incoming\Pending\NODEDIFF.A?? C:\Fd\Nodelist\
   dir/hkm C:\Fd\Nodelist\NODELIST.[0-9][0-9][0-9]
   dir/hkmo:-d C:\Fd\Nodelist\NODEDIFF.[0-9][0-9][0-9]
   except (C:\Fd\Nodelist\NODEDIFF.%FJD) del/q %=
C:\Fd\Nodelist\NODEDIFF.[0-9][0-9][0-9]
   move/q C:\Fd\Incoming\Pending\NODEDIFF.A[0-9][0-9] C:\Fd\Oldnode
   unset/q xjd tdate d_mod d_up d_day fjd
   goto compile
endiff

.......

:setting
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

.......

=== End   Cut: NODEDIFF.BTM ===

The above snippet does have some flaws; so beware!  But, for the most part,
it will handle multiple NodeDiff files within a single archive.

It will fail if you "fall behind" and get multiple NodeDiff archives at one
time (I expect that there is a cure for this, but it's very difficult to
test for).  And, it will fail if you receive the NodeDiff archive before the
expected date of the %FJD variable...

Has anyone had any success in converting my previous DIFFRUN.BTM into a
"pure" DOS batch file format?

           Cheers ... Gerald

... Great Canadian Lie #132: "We're just going for one beer..."

SOURCE: echoes via archive.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.