• Questions about batch file

    From Sean Dennis@1:18/200 to All on Mon Dec 9 00:26:39 2019
    Hello All.

    Needing a little help here...I wrote a simple batch file to process my weekly Fidonet nodelists. Should I be using something like nodelist.0?? or should I use nodelist.0* in the below batch?

    === Cut ===
    @echo off
    cd\qnode
    if exist d:\bt\in\nodelist.z?? copy d:\bt\in\nodelist.z??
    for %%A in (nodelist.0?? nodelist.1?? nodelist.2?? nodelist.3??) do echo y|del %%A
    unzip nodelist.z??
    echo y|del nodelist.z??
    qnode
    === Cut ===

    Thanks,
    Sean

    --- GoldED/2 3.0.1
    * Origin: Outpost BBS * bbs.outpostbbs.net:2304 (1:18/200)
  • From mark lewis@1:3634/12.73 to Sean Dennis on Tue Dec 10 16:02:52 2019

    On 2019 Dec 09 00:26:38, you wrote to All:

    Needing a little help here...I wrote a simple batch file to process my weekly Fidonet nodelists. Should I be using something like nodelist.0??
    or
    should I use nodelist.0* in the below batch?

    i don't know that it matters but some positive critique maybe?

    === Cut ===
    @echo off
    cd\qnode
    if exist d:\bt\in\nodelist.z?? copy d:\bt\in\nodelist.z??

    if exist d:\bt\in\nodelist.z?? move d:\bt\in\nodelist.z?? d:\qnode\

    for %%A in (nodelist.0?? nodelist.1?? nodelist.2?? nodelist.3??) do
    echo
    y|del %%A unzip nodelist.z?? echo y|del nodelist.z??

    then you don't need the above part at all... but that kinda looks mangled, now... i'd still do the move but i'm also still thinking in 4DOS/4OS2 mode... i'd probably do something like

    @echo off
    d:
    cd d:\qnode
    if exist d:\bt\in\nodelist.z?? move d:\bt\in\nodelist.z?? d:\qnode\
    if exist nodelist.0?? del /y nodelist.0??
    if exist nodelist.1?? del /y nodelist.1??
    if exist nodelist.2?? del /y nodelist.2??
    if exist nodelist.3?? del /y nodelist.3??
    unzip nodelist.z??
    del /y nodelist.z??

    it'll probably be faster than the loop but i dunno... it might also be "del /q"
    but i don't recall the raw OS/2 del command options any more...

    )\/(ark

    Once men turned their thinking over to machines in the hope that this would set
    them free. But that only permitted other men with machines to enslave them.
    ... Your call will be ignored in the order it was received.
    ---
    * Origin: (1:3634/12.73)
  • From Sean Dennis@1:18/200 to mark lewis on Wed Mar 10 19:01:50 2021
    Hello, mark!

    Replying to a message of mark lewis to Sean Dennis:

    it'll probably be faster than the loop but i dunno... it might also be "del /q" but i don't recall the raw OS/2 del command options any
    more...

    Just discovered I had this echo still but it wasn't set up in Squish, odd.

    So this is what I finally did to solve this:

    ===
    rem ** Process incoming Fidonet nodelists
    if not exist d:\bt\in\nodelist.z* goto toss
    cd\qnode
    copy d:\bt\in\nodelist.z??
    for %%f in (nodelist.0* nodelist.1* nodelist.2* nodelist.3*) do del /n %%f unzip nodelist.z*
    del /n nodelist.z*
    qnode
    ===

    This is part of Internet Rex's BETWEEN.CMD that is run when mail comes in.

    Later,
    Sean

    --- FleetStreet 1.27.1
    * Origin: Outpost BBS Local Console * bbs.outpostbbs.net:10123 (1:18/200)