home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
comm
/
mkdiff12.lha
/
makeall.rexx
next >
Wrap
OS/2 REXX Batch file
|
1993-01-01
|
3KB
|
87 lines
/* Makediff.rexx v1.0 (28 Dec 1992)
*
* A small add-on to the makediff utility to automatically make diff
* files for multiple networks.
*
* usage: rx makediff
*
* written by Iain Hibbert @ 2:255/35.13
*/
Dir = "Nodelist:" /* where to find and put the files */
/* you can have as many networks as you like */
networks = 2
/* first network nodelist to search for */
Nodelist.1 = "Region25"
DiffName.1 = "R25Diff"
latest.1 = 0
/* second network nodelist to search for */
Nodelist.2 = "Amylist"
DiffName.2 = "AmyDiff"
latest.2 = 0
/* find the most recent nodelist numbers.. */
files = showdir(Dir,,'0A'x)
do while files ~= ""
parse var files file '0A'x files
parse var file head '.' tail
do i = 1 to networks
if upper(Nodelist.i) == upper(head) then do
parse value statef(Dir||file) with . . . . day . . .
if day > latest.i then do
number.i = tail
latest.i = day
end
end
end i
end
do i = 1 to networks
say 'Latest 'Nodelist.i' nodelist is 'number.i
DiffName.i = DiffName.i || '.' || right(number.i,3,'0')
if exists(Dir||DiffName.i) then say DiffName.i' already exists.'
else do
/* find last weeks nodelist file */
tail = number.i - 7
if tail < 0 then do
tail = tail + 365
if ~exists(Dir||Nodelist.i||'.'||right(tail,3,'0')) then tail = tail + 1
end
OldList = Nodelist.i || '.' || right(tail,3,'0')
Nodelist.i = Nodelist.i || '.' || right(number.i,3,'0')
if ~exists(Dir||OldList) then say 'No 'OldList' to diff from.'
else do
writech(stdout, 'Making 'DiffName.i' .... ' )
address command 'makediff 'Dir||OldList Dir||Nodelist.i Dir||DiffName.i
say 'Done.'
/*
* after this, you can do whatever you want with the
* Diff file, it will be called DiffName.i in the Dir
* Directory.. the full file and pathname is:
*
* Dir || DiffName.i
*
* either you can upload it to the board automatically
* or you can send it out to the points that want it..
*
* note that this will be done for each network in the
* list, that a diff has been made for, so I suggest a
* different script file which you would write specifically
* for your own situation (hey, I never said it would be
* easy! ) eg
*
* address command 'SendDiff 'Dir||DiffName.i
*/
end
end
end i
exit