Hello Gerald,
In a message dated Apr 22 at 18:56, Gerald Miller of 1:153/715.6
wrote to Raymond Beriau:
RB> What extension does the incoming (nodelist/nodediff) file has?
GM> They appear to numbers... as in the last one I received had an
GM> extension of ".100". I think I tried using the extensions to
GM> determine the relative age of the files, but I trashed that idea
GM> because I think the @ext was being interpreted as a string rather
GM> than a series of digits...
GM>> The hunt continues...
RB> Too bad!
RB> I use that subroutine to determine the Julian day number of the
RB> closest Friday (when the FidoNet nodediff is released) and get the
RB> rest of the BTM file to operate accordingly...
GM> Peter Holm has suggested that I investigate
GM> "@FILEAGE[filename[,acw]]:", which I plan to experiment with over
GM> the weekend...
I just noticed this thread and, although I don't have all the messages, I
assume that you're trying to sort any existing nodediff files to select a
particular one.
Here's the batch file that I use, called from my binkley.bat file, to sort my
nodelist files, compile the latest version present, then delete the raw
nodelist files. It isn't exactly what you're looking for but it does handle
the extensions that you're having problems with. It may give you an idea of
just how to handle your particular situation:
::+++++++++++++++++++ Nodelist.bat ++++++++++++++++++++++++++
:: by Morris Turpin
iff %_env lt 148 then
%comspec //envfree=148 /c %0
quit
endiff
setlocal
iff exist d:\bbs\r12-list.* then
:: the following line from Dave M. Walker of 1:396/1
*dir /bo:-d d:\bbs\r12-list.* | set ext1=%@ext[%@line[con,0]]
move d:\bbs\r12-list.%ext1% d:\qnode
if exist d:\bbs\r12-list.* del /q d:\bbs\r12-list.*
else
echo no nodelists in d:\bbs
quit
endiff
*cdd d:\qnode
if exist nodelist.* del nodelist.*
d:\shez\arce\arce r12-list.%ext1%
del r12-list.%ext1%
*dir /bo:-d r12-list.* | set ext2=%@ext[%@line[con,0]]
ren r12-list.%ext2% nodelist.%ext2%
qnode
++++++++++++++++++++++++end of file++++++++++++++++++++++++++++++++
Here's what the lines do:
:: this section checks to see if there is at least 148 bytes of
:: environment space available (the minimum required). If not,
:: it restarts the batch file with 148 bytes of free environment space.
iff %_env lt 148 then
%comspec //envfree=148 /c %0
quit
endiff
:: save existing environment variables
setlocal
:: Check to see if there are any nodelist files (I only use my regional
:: r12-list.* files, you can change to suit your needs).
iff exist d:\bbs\r12-list.* then
:: the following line from Dave M. Walker of 1:396/1
:: As you can see, I wasn't smart enough to come up with this one
:: myself. It sorts all nodelist files in the directory by decreasing
:: filedate, ie it selects the newest file and then sets the environment
:: variable ext1 to whatever extension the newest nodelist has.
*dir /bo:-d d:\bbs\r12-list.* | set ext1=%@ext[%@line[con,0]]
:: move the most recent nodelist file to the qnode directory.
move d:\bbs\r12-list.%ext1% d:\qnode
:: delete all nodelist files
if exist d:\bbs\r12-list.* del /q d:\bbs\r12-list.*
else
echo no nodelists in d:\bbs
quit
endiff
:: I have an alias "cdd", hence the *
*cdd d:\qnode
:: delete the old nodelist files
if exist nodelist.* del nodelist.*
:: decompress the new nodelist file
d:\shez\arce\arce r12-list.%ext1%
:: delete the compressed file
del r12-list.%ext1%
:: determine the extension of the nodelist, similar to above but using
:: ext2 this time.
*dir /bo:-d r12-list.* | set ext2=%@ext[%@line[con,0]]
:: rename the filename so that qnode can work with it
ren r12-list.%ext2% nodelist.%ext2%
:: compile the nodelist file
qnode
:: I suppose I could have added "endlocal" but it's not really necessary.
I've been using this since version 4.something of 4dos so you shouldn't have
any problems with syntax. Hope this helps you out with your "project".
Cheers,
Morris
Morris Turpin
Proud Member of Team OS/2
fidonet: 1:163/307.9
internet: mturpin@igs.net
--- msged 2.07
---------------
* Origin: Warped in Ottawa, Canada (1:163/307.9)
|