• Questions about batch file

    From Sean Dennis@1:18/200 to All on Monday, December 09, 2019 00:26:39
    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 Tuesday, December 10, 2019 16:02:52
    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)