• TZ again

    From Spectre@21:3/106.10 to Al on Wednesday, October 23, 2019 18:16:00
    Alrighty, here we go, this one ought to have it in there... was set at the path
    I expected so the concatenation wasn't...

    Spec

    PS: And now because I edited the message after completion, this is going to have two on it.
    --- SuperBBS v1.17-3 (Eval)
    * Origin: Scrawled in haste at The Lower Planes (21:3/106.10)
  • From Spectre@21:3/106.10 to Spectre on Wednesday, October 23, 2019 18:20:00
    Alrighty, here we go, this one ought to have it in there...

    I forsee one problem... now it feels that an aborted message has text in it, because its got the TZ in it, and imports it as an otherwise empty message.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: <Shoot'n the breeze on The Lower Planes> (21:3/106.10)
  • From Oli@21:1/151 to Spectre on Wednesday, October 23, 2019 12:59:40
    On Wed, 23 Oct 2019 18:16:00 ++110
    "Spectre -> Al" <10@106.3.21> wrote:

    Alrighty, here we go, this one ought to have it in there... was set at the
    path
    I expected so the concatenation wasn't...

    Spec

    PS: And now because I edited the message after completion, this is going to have two on it.

    Wow, it worked, kind of. the correct line would be
    TZUTC: 1100
    not
    TZUTC: +1100

    (I think I used +1100 in a previous message, sorry)

    I only see one TZUTC kludge

    ---
    * Origin: (21:1/151)
  • From Oli@21:1/151 to Spectre on Wednesday, October 23, 2019 13:07:36
    On Wed, 23 Oct 2019 18:20:00 ++110
    "Spectre -> Spectre" <10@106.3.21> wrote:

    Alrighty, here we go, this one ought to have it in there...

    I forsee one problem... now it feels that an aborted message has text in
    it,
    because its got the TZ in it, and imports it as an otherwise empty message.

    How did you do it? I tried it in a DOSBox, but I realized I forgot everything about DOS, BAT files, ...

    What about a simple check if the MSGTMP file is empty before adding the kludge line?

    ---
    * Origin: (21:1/151)
  • From Spectre@21:3/106.10 to Oli on Thursday, October 24, 2019 09:39:00
    How did you do it? I tried it in a DOSBox, but I realized I forgot everything about DOS, BAT files,

    It wasn't that hard, although I don't know any batchfile logic to test for an empty file. I'm using...

    cd\iedit
    iceedit.exe /D:F:\SBBS\ /N:%1
    cd\sbbs
    type tzutc.txt > new.txt
    type msgtmp >> new.txt
    move new.txt msgtmp

    Just in case theres still a new.txt the first single > should overwrite the existing file. The second with >> adds the edited message to new.txt and then to help ensure theres no rubbish left behind we move new.txt over the original msgtmp. The %1 is only the node number from the batch files command line during
    calling.

    If anyone knows how to test for an empty file in a DOS batch file, I'm all ears.

    Spec


    *** THE READER V4.50 [freeware]
    --- SuperBBS v1.17-3 (Eval)
    * Origin: Scrawled in haste at The Lower Planes (21:3/106.10)
  • From poindexter FORTRAN@21:4/122 to Spectre on Wednesday, October 23, 2019 16:39:56
    Re: TZ again
    By: Spectre to Oli on Thu Oct 24 2019 09:39 am

    If anyone knows how to test for an empty file in a DOS batch file, I'm all ears.

    StackOverflow has a couple of examples...

    https://stackoverflow.com/questions/11225581/how-to-check-if-a-file-is-not-empt
    y-in-batch

    set size=0
    for /f %%i in ("file.txt") do set size=%%~zi
    if %size% gtr 0 echo Not empty
    --- SBBSecho 3.09-Win32
    * Origin: http://realitycheckbbs.org (21:4/122)
  • From Oli@21:1/151 to Spectre on Thursday, October 24, 2019 10:33:18
    On Thu, 24 Oct 2019 09:39:00 +1100
    "Spectre -> Oli" <10@106.3.21> wrote:

    How did you do it? I tried it in a DOSBox, but I realized I forgot
    everything about DOS, BAT files,

    It wasn't that hard, although I don't know any batchfile logic to test for
    an
    empty file. I'm using...

    cd\iedit
    iceedit.exe /D:F:\SBBS\ /N:%1
    cd\sbbs
    type tzutc.txt > new.txt
    type msgtmp >> new.txt
    move new.txt msgtmp

    Thanks, I didn't use the right parameters for iceedit. No wonder it didn't work
    :)

    Just in case theres still a new.txt the first single > should overwrite the existing file. The second with >> adds the edited message to new.txt and
    then
    to help ensure theres no rubbish left behind we move new.txt over the
    original
    msgtmp.

    I think (but haven't tested it), that "type" will add a <CR><LF> to the end of the line. In Fido it should be a <CR> only. Maybe SuperBBS changes that anyway.
    Other software should also ignore the <LF>.

    It's most likely an unimportant detail, but you could use

    a tzutc.txt file with
    <SOH>TZUTC: 1100<CR>

    and

    copy /b tzutc.txt + msgtmp new.txt

    ---
    * Origin: (21:1/151)
  • From Spectre@21:3/106.10 to Oli on Friday, October 25, 2019 06:10:00
    a tzutc.txt file with
    <SOH> TZUTC: 1100<CR>
    copy /b tzutc.txt + msgtmp new.txt

    My tzutc.txt file is pretty much just that. But I didn't have any joy with copy
    coming up with a reliable result. So I went back to reliable redirection :)

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: <Shoot'n the breeze on The Lower Planes> (21:3/106.10)
  • From Spectre@21:3/106.10 to poindexter FORTRAN on Friday, October 25, 2019 06:14:00
    StackOverflow has a couple of examples...

    I gave up looking online for answers to DOS batch files. Most of the information I come across is for Windows shells and quite often either doesn't work or not as expected...

    set size=0 for /f %%i in ("file.txt") do set size=%%~zi
    if %size% gtr 0 echo Not empty

    Chuckle, I don't know what thats doing, or how it does it :) I'll try it some time though. Ta.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: <Shoot'n the breeze on The Lower Planes> (21:3/106.10)
  • From Nightfox@21:1/137 to poindexter FORTRAN on Thursday, October 24, 2019 13:09:14
    Re: TZ again
    By: poindexter FORTRAN to Spectre on Wed Oct 23 2019 04:39 pm

    If anyone knows how to test for an empty file in a DOS batch file,
    I'm all ears.

    StackOverflow has a couple of examples...

    https://stackoverflow.com/questions/11225581/how-to-check-if-a-file-is-not -empt
    y-in-batch

    set size=0
    for /f %%i in ("file.txt") do set size=%%~zi
    if %size% gtr 0 echo Not empty

    It seems to me one of the troubles of looking online for DOS batch file help is
    that many people seem to confuse DOS for the Windows command prompt, and I think modern Windows batch file language is somewhat different (a little more flexible/robust, perhaps) in some cases than classic DOS batch file language. So while someone may say it's a solution for a DOS batch file, it may only work
    in modern versions of Windows.

    Nightfox
    --- SBBSecho 3.10-Win32
    * Origin: Digital Distortion: digdist.synchro.net (21:1/137)
  • From Oli@21:1/151 to Spectre on Thursday, October 24, 2019 23:35:26
    If anyone knows how to test for an empty file in a DOS batch file, I'm
    all ears.

    I found this:

    https://www.experts-exchange.com/questions/21393712/Check-if-file-is-empty.html

    I haven't tested it, because there is no FC command in DOSBox.


    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: format of this message has been mangled by Mystic BBS (21:1/151)
  • From Spectre@21:3/106.10 to Oli on Friday, October 25, 2019 10:12:00
    I haven't tested it, because there is no FC command in DOSBox.

    Theres an FC in DOS6.x so this is one that should be easy to do.. Its an external command, so you could just copy it into your dosbox to try. Worst case it gives an incorrect dos version and quits.

    Spec


    *** THE READER V4.50 [freeware]
    --- SuperBBS v1.17-3 (Eval)
    * Origin: Scrawled in haste at The Lower Planes (21:3/106.10)
  • From Nightfox@21:1/137 to Spectre on Thursday, October 24, 2019 19:57:10
    Re: TZ again
    By: Spectre to Oli on Fri Oct 25 2019 10:12 am

    I haven't tested it, because there is no FC command in DOSBox.

    Theres an FC in DOS6.x so this is one that should be easy to do.. Its an external command, so you could just copy it into your dosbox to try. Worst case it gives an incorrect dos version and quits.

    If that's the error I'm thinking of, I remember a command in MS-DOS (5.0 and above, I think?) that tells it to report a certain DOS version number so that programs checking for a specific MS-DOS version will run.

    Nightfox
    --- SBBSecho 3.10-Win32
    * Origin: Digital Distortion: digdist.synchro.net (21:1/137)
  • From Spectre@21:3/106.10 to Nightfox on Friday, October 25, 2019 17:25:00
    I haven't tested it, because there is no FC command in DOSBox.

    Worst case it gives an incorrect dos version and quits.

    If that's the error I'm thinking of, I remember a command in MS-DOS (5.0 and above, I think?) that tells it to report a certain DOS version

    I recall that too, I don't recall what it was now. But it didn't fix every problem. Some things just weren't compatible. I also don't know if DOSbox supports it either. Ahh setver....

    Spec


    *** THE READER V4.50 [freeware]
    --- SuperBBS v1.17-3 (Eval)
    * Origin: Scrawled in haste at The Lower Planes (21:3/106.10)
  • From Spectre@21:3/106.10 to Al on Wednesday, October 23, 2019 18:16:00
    Alrighty, here we go, this one ought to have it in there... was set at the path
    I expected so the concatenation wasn't...

    Spec

    PS: And now because I edited the message after completion, this is going to have two on it.
    --- SuperBBS v1.17-3 (Eval)
    * Origin: Scrawled in haste at The Lower Planes (21:3/106.10)
  • From Spectre@21:3/106.10 to Spectre on Wednesday, October 23, 2019 18:20:00
    Alrighty, here we go, this one ought to have it in there...

    I forsee one problem... now it feels that an aborted message has text in it, because its got the TZ in it, and imports it as an otherwise empty message.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: <Shoot'n the breeze on The Lower Planes> (21:3/106.10)
  • From Spectre@21:3/106.10 to Oli on Friday, October 25, 2019 06:10:00
    a tzutc.txt file with
    <SOH> TZUTC: 1100<CR>
    copy /b tzutc.txt + msgtmp new.txt

    My tzutc.txt file is pretty much just that. But I didn't have any joy with copy
    coming up with a reliable result. So I went back to reliable redirection :)

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: <Shoot'n the breeze on The Lower Planes> (21:3/106.10)
  • From Spectre@21:3/106.10 to poindexter FORTRAN on Friday, October 25, 2019 06:14:00
    StackOverflow has a couple of examples...

    I gave up looking online for answers to DOS batch files. Most of the information I come across is for Windows shells and quite often either doesn't work or not as expected...

    set size=0 for /f %%i in ("file.txt") do set size=%%~zi
    if %size% gtr 0 echo Not empty

    Chuckle, I don't know what thats doing, or how it does it :) I'll try it some time though. Ta.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: <Shoot'n the breeze on The Lower Planes> (21:3/106.10)