• Batch file help

    From Bill Gordon@1:3634/22 to All on Fri Sep 9 16:38:00 2011
    I need a batch file that looks at my FidoNet inbound directory and has
    a file checking function that checks for either a semaphore or a nodediff
    or a nodelist itself.

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

    Thanks
    ---
    * Origin: *Square One telnet://sq1bbs.com (1:3634/22)
  • From Richard Webb@1:116/901 to Bill Gordon on Fri Sep 9 22:37:22 2011
    HEllo Bill,

    On Fri 2011-Sep-09 16:38, Bill Gordon (1:3634/22) wrote to All:

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

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

    <hmmmm> PRetty broad request, but let's see if I can help.

    I use binkleyterm as my mailer, and anything I'll allow to
    be automatically processed will be founded in my protected
    inbound, i.e. c:\bt\prot would be the path to it.

    sO, just in case binkley didn't take the e4 exit for .tic
    files received, I then have a line in the after compressed
    mail received code that says:

    if exist c:\bt\prot\*.tic goto ticin

    same with a nodediff if you like, i.e.

    if exist path\nodediff.* goto nodediff

    Then invoke your usual nodediff processing or whatever.

    I have a directory where programs put semaphore files, if
    flag file is found we branch to appropriate place and do
    that process. we'll call it working. A separate batch
    executes after we toss incoming mail and do other processing that looks for bunches of these things, and if found
    branches, does a lot of work, from updating databases to all sorts of good things.

    A few more specifics might help us help you.


    Regards,
    Richard
    ---
    * Origin: (1:116/901)
  • From Bill Gordon@1:3634/22 to Richard Webb on Sat Sep 10 09:07:00 2011
    * In a messge originally to Bill Gordon, Richard Webb said:

    Hello Bill,

    A few more specifics might help us help you.

    Well, here's an outline of what I want it to do. Maybe that'll help:

    1. check the inbound directory (fido\in) to see if there is any mail/files
    2. if not, check the outbound directory (fido\out) to see if there
    are any outgoing mail/files
    3. if there is nothing, just quit
    4. if there are, check to see if one of them is the nodediff
    5. if so, copy it to the nodelist directory and process it
    6. if any other kind of mail or files then process them
    7. end

    I'm using IREX as the mail retriever, FastEcho as the mail tosser, and
    AllFix as the tic processor.

    The batch file I have now runs every 10 minutes and does everything
    o.k. if I copy the nodediff manually. But it builds up a bunch of large log files, and they are eating up valuable HD space.

    Not being a programmer, IÆm sure there is an easier/quicker way to do
    all this. The batch file I have now runs the rabbit all over the county,
    and IÆm sure there is a more direct route.

    Thanks
    ---
    * Origin: *Square One telnet://sq1bbs.com (1:3634/22)
  • From Richard Webb@1:116/901 to Bill Gordon on Sat Sep 10 14:53:50 2011
    Hello Bill,

    On Sat 2011-Sep-10 09:07, Bill Gordon (1:3634/22) wrote to Richard Webb:

    Well, here's an outline of what I want it to do. Maybe that'll help:

    Right, only trouble for me is, yes I could do a lot of if
    exist stuff that you could plug in, and help you build the
    appropriate labels to do what's needed if file exists, etc.
    But, I don't know IRex from ADam's house cat, and I think if it's like most other fIdonet stuff it generates errorlevels
    or something similar to fire processes after receipt of
    mail, etc.

    1. check the inbound directory (fido\in) to see if there is any mail/files

    Okay, easy enough with the nodediff, but it's going to be
    just as long and convoluted to check for *.su*, *.mo*, etc.
    to check for them as they're currently named by most. If
    Irex generates errorlevels after receipt of mail then you
    can trap that in your batch as in:

    if errorlevel 50 goto dothis
    if errorlevel 40 goto dothat
    if errorlevel 30 goto picknose
    if errorlevel 20 goto burp

    Remember to trap errorlevels in descending order. Consult
    your irex docs, they might have easier ways. But, for your
    nodediff ...
    if exist fido\in\nodediff.* goto do_diff

    Then create the label

    :do_dif
    :: insert the lines to invoke the process that handles your
    nodediff.
    :: at the end of do_diff remember to return
    :: for further processing

    :: remember to create lines for labels with one preceding
    :: colon, two as shown here are comments
    :: that don't take up memory
    :: or whatever as the next line would
    rem this is also a comment.


    Caveat here. If allfix is gonna touch the nodediff archive, and you especially
    want to send it to downlinks or points
    don't let the line delete that archive from fido=in or
    allfix is gonna complain where it has to move the nodediff
    archive somewhere else and generate .tic files for any
    downlinks.

    As for the rest, it could get rather convoluted and
    complicated imho when IRex might already give you some of
    the solution you seek here. I don't know, may have the Irex docs around here somewhere, but don't have time over the
    next few days to pore over them.

    Glad to help with some basic tutorial hand holding on how to create some good batch files to help you along. Get from
    your uplink using whatever method you use to freq the
    maximus bbs docs, some good basics on batch files there, and lots of good stuff
    archived in the bfds. Connect with the
    POsitronium repository, iirc 1:19/68 possibly also flying
    under 1:393/68, I haven't checked lately for a complete bfds archive.


    POsting some of your batch code snippets may also help us
    help you out, but first consult your irex docs.

    maybe an irex user will delurk
    that can give you some pointers as well.

    Regards,
    Richard
    ---
    * Origin: (1:116/901)
  • From Bill Gordon@1:3634/22 to Richard Webb on Sat Sep 10 12:59:00 2011
    One more bit of info: my BBS is not run from a batch file. Maybe it
    should be, but when I went to EleBBS and telnet only, the batch file I
    had running RA went out the window.
    ---
    * Origin: *Square One telnet://sq1bbs.com (1:3634/22)
  • From Richard Webb@1:116/901 to Bill Gordon on Sat Sep 10 21:28:19 2011
    Hello Bill,

    On Sat 2011-Sep-10 12:59, Bill Gordon (1:3634/22) wrote to Richard Webb:

    One more bit of info: my BBS is not run from a batch file. Maybe it
    should be, but when I went to EleBBS and telnet only, the batch file
    I had running RA went out the window.

    The only way that may make a difference is if your mail
    tosser is trying to toss messages to a base that a user is
    using right now. I'm not familiar with your bbs package
    either, so whether it supports some type of busy flags to
    prevent this, either reads or writes them I couldn't tell
    you.

    IT sounds to me Bill as if you need to do a whole bunch more rtfm.

    Regards,
    Richard
    ---
    * Origin: (1:116/901)
  • From Bill Gordon@1:3634/22 to Richard Webb on Sat Sep 10 19:23:14 2011
    Hello Richard.

    Replying to a msg dated 10 Sep 11 21:28, from you to me.
    You are probably right about RTFM, but unfortunately, the EleBBS manual and the
    RA manual are about the same. This is an RA clone, but with a few minor differences, many of which I don't exactly understand.

    Thanks

    Bill

    ---
    * Origin: *Square One BBS telnet://sq1bbs.com (1:3634/22)
  • From Richard Webb@1:116/901 to Bill Gordon on Sun Sep 11 00:22:56 2011
    Hi Bill,

    On Sat 2011-Sep-10 19:23, Bill Gordon (1:3634/22) wrote to Richard Webb:

    Hello Richard.

    You are probably right about RTFM, but unfortunately, the EleBBS
    manual and the RA manual are about the same. This is an RA clone,
    but with a few minor differences, many of which I don't exactly
    understand.

    <hmmm> So, if you won't be getting in mail while somebody's on the bbs, or exporting mail while they're on you're
    probably still safe.

    Main thing is then what to do with your irex, and the IRex
    docs will probably tell you if it generates errorlevels
    after receipt of mail. That will probably be as simple or
    simpler than looking for mail files as I stated earlier.
    Check that out, and if so you're alright.

    IF you really want to be sure that the system doesn't fight
    with a user over a msg base, etc. you can probably tell some sort of way if a user is online. AS I said I'm not sure,
    but I know ra has multinode capability which means somehow
    it's multitasker aware.

    Back in the day I helped set up wildcat! and tag, but i
    mostly stuck with Maximus with squish and bink because it
    was all free for noncommercial use, it configured with text
    files for the most part which I prefer, and I didn't have a
    lot of money to spend on the fIdonet hobby other than that
    required to bring in the mail.
    Somebody who knows IRex could help you get started in the
    proper direction much better than I, and I would then be
    more than glad to chime in with ideas, but I'm not familiar
    enough to get you started it appears.


    Regards,
    Richard
    ---
    * Origin: (1:116/901)
  • From Daryl Stout@1:19/33 to Richard Webb on Sun Sep 11 13:39:10 2011
    Richard...

    Irex generates errorlevels after receipt of mail then you
    can trap that in your batch as in:

    if errorlevel 50 goto dothis
    if errorlevel 40 goto dothat
    if errorlevel 30 goto picknose
    if errorlevel 20 goto burp

    I always suspected the computer was almost human!! <G>

    Daryl

    ... Internal Error: The system has been taken over by sheep at line 19960
    --- MultiMail/Win32 v0.49

    --- Virtual Advanced Ver 2 for DOS
    * Origin: wx1der.dyndns.org (1:19/33)
  • From Daryl Stout@1:19/33 to Bill Gordon on Sun Sep 11 13:39:10 2011
    Billl...

    One more bit of info: my BBS is not run from a batch file. Maybe it should be, but when I went to EleBBS and telnet only, the batch file I had running RA went out the window.

    I still use batchfiles under VA...still remembering a document I got
    from a fellow Sysop when my BBS first went up 20 years ago. Entitled
    "So You Want To Be A Sysop", it actually had 4 separate bulletins. But,
    the applicable part for this echo was "you must construct batchfiles
    for events, etc., or be prepared to live at your computer". <G>

    That file is still a bulletin in my textfiles area.

    Daryl

    ... Windows Vista7 Virus: Renders all 16 bit legacy DOS programs useless.
    --- MultiMail/Win32 v0.49

    --- Virtual Advanced Ver 2 for DOS
    * Origin: wx1der.dyndns.org (1:19/33)
  • From Timothy Cornett@1:135/364 to Daryl Stout on Sat Sep 17 08:56:45 2011
    Re: Re: Batch file help


    I still use batchfiles under VA...still remembering a document I got
    from a fellow Sysop when my BBS first went up 20 years ago. Entitled
    "So You Want To Be A Sysop", it actually had 4 separate bulletins.
    the applicable part for this echo was "you must construct batchfiles
    for events, etc., or be prepared to live at your computer". <G>

    That file is still a bulletin in my textfiles area.

    Amen to that Daryl <G>

    -Timothy Cornett
    Deep Space 69 BBS
    telnet://bbs.ds69bbs.com

    --- Virtual Advanced Ver 2 for DOS
    * Origin: Deep Space 69 BBS - telnet://bbs.ds69bbs.com - Florida (1:135/364)
  • From BOB KLAHN@1:123/140 to TIMOTHY CORNETT on Tue Sep 20 16:21:26 2011
    I still use batchfiles under VA...still remembering a document I got
    from a fellow Sysop when my BBS first went up 20 years ago. Entitled
    "So You Want To Be A Sysop", it actually had 4 separate bulletins.
    the applicable part for this echo was "you must construct batchfiles
    for events, etc., or be prepared to live at your computer". <G>

    That file is still a bulletin in my textfiles area.

    Amen to that Daryl <G>

    Batch files are your friends.

    I still use QBasic on my XP. Both batch and QBasic work just
    fine. I could upgrade, but I'm too lazy to learn another
    language.

    Ok, maybe Farsi.

    BOB KLAHN bob.klahn@sev.org http://home.toltbbs.com/bobklahn

    ... Yoyodyne Entertainment..."Where the future begins...tomorrow."
    --- Via Silver Xpress V4.5/P [Reg]
    * Origin: Since 1991 And Were Still Here! DOCSPLACE.TZO.COM (1:123/140)
  • From Daryl Stout@1:19/33 to Richard Webb on Mon Sep 12 11:44:58 2011
    Hi, Richard...

    <hmmm> So, if you won't be getting in mail while somebody's on the
    bbs, or exporting mail while they're on you're
    probably still safe.

    I've got IREX set up in daemon mode, but I only unpack incoming,
    and pack up outgoing netmail and echomail during nightly maintenence...
    when no one is allowed to logon anway. The only other time users aren't
    able to connect is for thunderstorms...and we have chances of them later
    this week. So, it doesn't bother me if a user telnets into the BBS, while
    IREX is getting incoming, or sending outgoing packets, outside of nightly maintenance.

    But, I wish I could implement a batchfile that'd keep lightning away!!

    Daryl

    ... Why give the airport temperature?? No one lives there.
    --- MultiMail/Win32 v0.49

    --- Virtual Advanced Ver 2 for DOS
    * Origin: wx1der.dyndns.org (1:19/33)
  • From Richard Webb@1:116/901 to Daryl Stout on Fri Sep 23 14:09:26 2011
    HEllo Daryl,

    On Mon 2011-Sep-12 11:44, Daryl Stout (1:19/33) wrote to Richard Webb:

    <hmmm> So, if you won't be getting in mail while somebody's on the
    bbs, or exporting mail while they're on you're
    probably still safe.

    I've got IREX set up in daemon mode, but I only unpack incoming,
    and pack up outgoing netmail and echomail during nightly
    maintenence... when no one is allowed to logon anway. The only other
    time users aren't able to connect is for thunderstorms...and we have chances of them later this week. So, it doesn't bother me if a user
    telnets into the BBS, while IREX is getting incoming, or sending
    outgoing packets, outside of nightly maintenance.

    Right, you might have some better clues than I how to help
    Bill then. I'm not familiar enough to be of any real useful assistance to him,
    although I tried to give him some
    pointers toward basics. HIs query was vague enough that I
    wasn't quite sure what he's really after here.

    But, I wish I could implement a batchfile that'd keep lightning
    away!!

    <Rotfl> That would be handy, but doubtful.

    Regards,
    Richard
    ---
    * Origin: (1:116/901)
  • From Timothy Cornett@1:135/364 to BOB KLAHN on Fri Sep 30 07:49:36 2011
    Re: Batch file help


    Batch files are your friends.

    I still use QBasic on my XP. Both batch and QBasic work just
    fine. I could upgrade, but I'm too lazy to learn another
    language.

    Ok, maybe Farsi.

    I always seem to pick up bits and pieces of new languages here and there, I must admit my programs I have written are written in bits and pieces of 5 or 6 languages, but still work like a charm. :)

    -Timothy Cornett
    Deep Space 69 BBS
    telnet://bbs.ds69bbs.com

    --- Virtual Advanced Ver 2 for DOS
    * Origin: Deep Space 69 BBS - telnet://bbs.ds69bbs.com - Florida (1:135/364)
  • From Richard Webb@1:116/901 to Bill Gordon on Fri Dec 2 04:53:08 2011
    HEllo bill,

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

    I need a batch file that looks at my FidoNet inbound directory and
    has a file checking function that checks for either a semaphore or
    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.

    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)