home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 56 
 Richard Webb to Bill Gordon 
 Batch file help 
 02 Dec 11 04:53:08 
 
HEllo bill,

FIrst, hope you haven't given up on any help forthcoming.
YOu originally wrote:

BG> I need a batch file that looks at my FidoNet inbound directory and
BG> has  a file checking function that checks for either a semaphore or
BG> a nodediff  or a nodelist itself.

IF I'm recalling later in the thread, we were talking about
a lot of things that happen when Irex receives mail.  I'm
assuming that you have rex creating semaphores to start the
after mail processing with fastecho, etc.

So, let's say you received your nodediff, and with it you
received a *.tic file.

NOw is when the fun begins.

Before your tic processor goes to crunching on that tic file you can create
your own semaphore enabling it to process the
nodelist.

Create a batch which is invoked right before your tic
process which changes to your inbound directory, or run that from the same
batch which runs your tic processor, fastecho
and the like.
Create another batch, call it pretick.bat.

Let's say your batch starts, and your inbound is d:\inbound.

change to that directory and ...

if exist *.tic goto checktix
goto domail

:: if no *.tic files present we go on to invoke fastecho iirc :: that's your
mail processor.

:: NOw we build checktix

:checktix
for %%F in (*.tic) do call pretick.bat %%F
:: call your usual tic processor here, allfix, nef, tick,
:: whatever you're using
goto domail

pretick.bat checks for receipt of a nodediff

::pretick.bat
@echo off
type %1 | find "nodediff" /i /c
if errorlevel 2 goto gotdiff
goto end
:gotdiff
echo .. >> nodeup.sem
goto end
:end
cd \

Now if you want to process that nodediff, you can later on
in the batch look for nodeup.sem in your inbound directory,
or, to keep things neat, place that semaphore where you
usually put semaphore files, or where irex usually puts
them.
THen at an appropriate time it can look for nodeup.sem and
crunch on your nodediff with fastlist or whatever nodelist
merger/compiler you're using.

Btw I prefer to use fgrep386 for such find operations as the one above, when
used with the -x and -e switches it
generates errorlevel 1 if the string was found, no messy
quotes needed, etc. etc.
THe only time you need to surround the string with quotes is if it's not an
alphanumeric.

BG> Not being a programmer, I'm kinda out of my depth.

This one's fairly simple, and irex should generate flag or
semaphore files for you when mail and files are received.
Have been looking at its docs a little bit lately.


Regards,
           Richard
---
 * Origin:  (1:116/901)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca