• Batch Command Question

    From Daryl Stout@1:19/33 to All on Wed Dec 11 19:09:17 2013
    I have it set up in my nightly maintenance batch file
    to process incoming nodelist files, and copy them to
    the needed directories.

    However, sometimes, I get a file that's already in
    there (extracted from the *.Z?? file), and the
    system stops at the prompt, asking if I want to
    overwrite it (the answer is yes). Sometimes, I don't
    discover that until the next morning.

    I know that the command ECHO Y|DEL *.* will wipe out
    the contents in a directory (one has to be careful
    with that).

    I think that ECHO A| (followed by the PKUNZIP command
    desired) would work, but I'm not sure of the syntax.

    It's probably a simple answer, but I'm afraid if I
    try something, without being sure of it, I'll get into
    trouble!!

    Any help would be appreciated.

    Daryl

    ... Real Programmers Practice Safe HEX
    --- MultiMail/Win32 v0.49

    --- Virtual Advanced Ver 2 for DOS
    * Origin: The Thunderbolt BBS (1:19/33)
  • From Paul Quinn@3:640/384 to Daryl Stout on Thu Dec 12 17:37:00 2013
    Hi! Daryl,

    In a message to All you wrote:

    However, sometimes, I get a file that's already in
    there (extracted from the *.Z?? file), and the
    system stops at the prompt, asking if I want to
    overwrite it (the answer is yes). Sometimes, I don't
    discover that until the next morning.

    Try the "-o" PKUNZIP option on the command line, Daryl. That's the 'overwrite'
    option that you need, I'm sure.

    Cheers,
    Paul.

    ... BillDOS & TedDOS: Truly excellent command. Party on [Y/y]?
    --- Paul's Win98SE VirtualBox
    * Origin: Quinn's Post - Maryborough, Queensland, OZ (3:640/384)
  • From Daryl Stout@1:19/33 to Paul Quinn on Fri Dec 13 14:48:41 2013
    Hi! Daryl,

    Hi, Paul...

    Try the "-o" PKUNZIP option on the command line, Daryl. That's the 'overwrite' option that you need, I'm sure.

    So would the command be something like:

    IF EXIST *LIST.Z0? ECHO O|PKUNZIP *LIST.Z0? *LIST.0??

    Note: I'd also have the .Z#? with 1 through 9, and the last ones also as
    1, 2, or 3.

    This way, the batchfile updates the nodelist directories automatically
    when a new nodelist data file arrives.

    I can write a batchfile, but my programming ends at setting the clock
    on the microwave oven. <G>

    Daryl
    ... Relax...it's all a matter of 1's and 0's.
    --- MultiMail/Win32 v0.49

    --- Virtual Advanced Ver 2 for DOS
    * Origin: The Thunderbolt BBS (1:19/33)
  • From Paul Quinn@3:640/384 to Daryl Stout on Sat Dec 14 17:38:00 2013
    Hi! Daryl,

    On Fri, 13 Dec 13, you wrote to me:

    So would the command be something like:

    IF EXIST *LIST.Z0? ECHO O|PKUNZIP *LIST.Z0? *LIST.0??
    ^
    Insert the -o right here, Daryl. >-----+ It's a runtime option for PKUNZIP.
    Nothing to do with DOS. (Cut that "ECHO O|" out.) If you run the PKUNZIP program by itself, you will see the option listed in the on-screen help.

    Note: I'd also have the .Z#? with 1 through 9, and the last ones also
    as 1, 2, or 3.
    This way, the batchfile updates the nodelist directories
    automatically when a new nodelist data file arrives.

    Ooh, okay. I use the Husky nodelist updater tool. It figures all that out by itself. Here's a few snippets from my batch...

    [ ...some bits beforehand... ]
    :: Copy the inbound NodeList to a temp area before EzyTicIt catches it...
    IF EXIST %DOWNLOAD%\NODELIST.* COPY /Y %DOWNLOAD%\NODELIST.* %TEMP%
    [ ...some bits between... ]
    CD %FIDOUTIL%
    :: Do a full nodelist update,
    nlupdate.exe
    [ ...more bits afterward... ]

    When it's finished, the nodelist has been updated. (Since I only use full nodelists these days, the old one is simply replaced.) The %TEMP% copy bites the dust after the updater tool runs. Sure, it requires a config file but it's
    intelligent enough to work with PKUNZIP and multiple filenames, as required.

    I can write a batchfile, but my programming ends at setting the
    clock on the microwave oven. <G>

    I can't do that. It's in the kitchen, so it's the wife's job. (Mind you, i could never 'do' them anyhow. Video machines, yeah, not a problem even for days in advance. Microwaves, nope.)

    Cheers,
    Paul.

    ... Who is General Failure and why is he reading my disk?
    --- Paul's Win98SE VirtualBox
    * Origin: Quinn's Post - Maryborough, Queensland, OZ (3:640/384)
  • From Daryl Stout@1:19/33 to Paul Quinn on Sun Dec 15 12:45:35 2013
    Paul...

    IF EXIST *LIST.Z0? ECHO O|PKUNZIP *LIST.Z0? *LIST.0??
    ^
    Insert the -o right here, Daryl. >-----+ It's a runtime option for PKUNZIP. Nothing to do with DOS. (Cut that "ECHO O|" out.) If you run the PKUNZIP program by itself, you will see the option listed in the on-screen help.

    OK, I'll try that later today...been fixing glitches that I discovered last night.

    I can't do that. It's in the kitchen, so it's the wife's job. (Mind you, i could never 'do' them anyhow. Video machines, yeah, not a
    problem even for days in advance. Microwaves, nope.)

    One of the "bands" in ham radio is known as the "microwave frequencies". However, with antennas not allowed where I live, I quip that use of the microwave oven is my extent of microwave communications. <G>

    Daryl

    ... Real Programmers Practice Safe HEX
    --- MultiMail/Win32 v0.49

    --- Virtual Advanced Ver 2 for DOS
    * Origin: The Thunderbolt BBS (1:19/33)