• Batch File Help

    From Ed Vance@1:2320/105 to All on Tuesday, July 07, 2020 23:03:00
    Howdy!,

    I know how to Redirect the output of a .BAT File to Save it to the HDD
    using >> .

    When I do that I can't see the output of the .BAT File on the screen.

    I'm trying to figure out how to write some line(s?) in my .BAT File
    that will make the computer SHOW the Output and SAVE the Output to a
    File on the HDD at the SAME TIME.

    Probably someone reading will say "That's Duck Soup" or that my idea
    is "ELEMENTARY".

    It may be, but right now it is beyond my capability.

    Thanks for the Help.

    73 de Ed W9ODR . .


    ... Don't ask a butcher's advice on cooking; if he knew, he'd be a chef.
    --- MultiMail/MS-DOS v0.49
    * Origin: capitolcityonline.net * Telnet/SSH:2022/HTTP (1:2320/105)
  • From Wilfred van Velzen@2:280/464 to Ed Vance on Wednesday, July 08, 2020 11:12:57
    Hi Ed,

    On 2020-07-07 23:03:00, you wrote to All:

    I know how to Redirect the output of a .BAT File to Save it to the HDD using >> .

    When I do that I can't see the output of the .BAT File on the screen.

    I'm trying to figure out how to write some line(s?) in my .BAT File
    that will make the computer SHOW the Output and SAVE the Output to a
    File on the HDD at the SAME TIME.

    You need the "tee" command. On linux it's a standard command, probably not on windows, but I have it in my "library", so it does exist ;).

    It writes the data it receives on standard-in to standard-out, _and_ writes it to a file. So does exactly what you want.

    For example:

    echo "Hi!" | tee.exe -a example.log

    Will write "Hi!" to the screen and append it to example.log...


    Bye, Wilfred.

    --- FMail-lnx64 2.1.0.18-B20170815
    * Origin: FMail development HQ (2:280/464)
  • From August Abolins@2:221/360 to Ed Vance on Wednesday, July 08, 2020 16:27:05
    On 7/7/2020 11:03 PM, between "Ed Vance : All":

    I know how to Redirect the output of a .BAT File to Save it to the HDD
    using >> .

    When I do that I can't see the output of the .BAT File on the screen.

    I'm trying to figure out how to write some line(s?) in my .BAT File
    that will make the computer SHOW the Output and SAVE the Output to a
    File on the HDD at the SAME TIME.



    If the bat file does not require any interactive user input:

    bat > bat-out.txt | type bat-out.txt

    Quick and simple in a pinch.

    --- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.16) Gecko/20101125
    * Origin: nntp://rbb.fidonet.fi - Lake Ylo - Finland (2:221/360.0)
  • From mark lewis@1:3634/12 to Ed Vance on Wednesday, July 08, 2020 10:55:25
    Re: Batch File Help
    By: Ed Vance to All on Tue Jul 07 2020 23:03:00


    I'm trying to figure out how to write some line(s?) in my .BAT File
    that will make the computer SHOW the Output and SAVE the Output to a
    File on the HDD at the SAME TIME.


    set MYTEXT=this is the text i want to see on the screen and save
    set MYTEXT=$MYTEXT to the disk file. this is also an example of
    set MYTEXT=$MYTEXT how to do multiple lines like a paragraph.

    echo $MYTEXT
    echo $MYTEXT >> mydiskfile.txt




    )\/(ark
    --- SBBSecho 3.11-Linux
    * Origin: SouthEast Star Mail HUB - SESTAR (1:3634/12)
  • From Ed Vance@1:2320/105 to All on Wednesday, July 08, 2020 20:29:00
    Howdy! Wilfred, August and Mark,

    Thanks for the suggestions, my .BAT file runs a FTP Script to Log On
    the Capitol City Online BBS and GETS a .QWK Packet from Mikes BBS.

    I have another .BAT File that Logs On and PUTS my .REP File On the BBS.

    The AT&T DSL internet connection speed varys each time I use those .BAT
    Files, and I was wonder if there waa a simple way to add something to the
    .BAT File to Save the .QWK Packet and also Write a File with what I see
    on the screen as the .BAT File runs.

    I was just wondering if I could make this XP pc "Do It My Way".

    I checked if there were a TEE.EXE Command on XP but guess that is a
    Terminal Command for use in Ubuntu, Mint or some other Linux distro.

    I've tried Ubuntu off and on since v7.04 running it off a Live CD and
    also have tried using it in a Innotek Virtual Box but haven't got
    comfortable enough to want to dive in and make a Linux Flavor the O/S
    I use daily.

    Thanks for the help, You proved that I'm not too far gone to be helped.

    73 de Ed W9ODR . .


    ... Here On Earth Computers Alway Win Because They Have Inside Information
    --- MultiMail/MS-DOS v0.49
    * Origin: capitolcityonline.net * Telnet/SSH:2022/HTTP (1:2320/105)