Category : Batch File Utilities - mostly for DOS
Archive   : BATOUT12.ZIP
Filename : BATOUT.DOC

 
Output of file : BATOUT.DOC contained in archive : BATOUT12.ZIP
ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ BATOUT.EXE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ

Batch File Exit Utility
Tom Kellen
áETATech Computer Consulting

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PURPOSE: To provide a timed exit or jump within a batch file based
on a keystroke.



INTRODUCTION:

This little ditty runs a timer to allow you a pause to exit a batch
file. I wrote this to use on my BBS machine as it loads a device
driver that disables the Ctrl/Break. The AUTOEXEC.BAT on the BBS
machine automatically loads the BBS, so what I needed was a utility
that would allow me to exit the batch file before Spitfire loads.
BatOut gives a delay to your batch files waiting for a key stroke.
If I am not there and the machine reboots, the AUTOEXEC runs BatOut
and it just times out loading the BBS. If I am there and have
rebooted the machine to do some maintenance and don't want the BBS
loaded, I just hit a key and BatOut aborts the batch file.

Here is the tail end of my BBS machine's AUTOEXEC.BAT:

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
C:
CD\SF
CLS
ECHO Should the BBS be loaded?
ECHO .
@BatOut 10
IF ErrorLevel 1 GOTO EXIT
BOOTLOG C:\SF\WORK\CALLERS.LOG
SF
:EXIT
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_



INSTALLATION:

Place BATOUT.EXE in a subdirectory that is somewhere on the path.
That is all there is to it.



OPERATION:

BatOut takes one required command line parameter, and two optional
ones. The required parameter is the number of seconds to wait. This
must be between 0 and 99. BatOut will then display the seconds
counting down. If you do nothing the program will halt at the number
of seconds you specified with an ErrorLevel of 0. If you press the
key, BatOut will exit immediately with an ErrorLevel of 0.
This effectively continues your batch file immediately. If you press
any other key, BatOut exits with an ErrorLevel of 1. You then check
for this ErrorLevel and use a GOTO statement to skip to the end of the
batch file.

BatOut can also be used for branching in batch files. If there was
a command in a batch file that you only want to run occasionally, you
can use BatOut to jump to a label beyond that command, just by hitting
a key.

BatOut also takes 2 optional parameters. The first one is /T. This
parameter stops BatOut from displaying the program name and copyright.
Please honor the copyright, but I can understand some folks wanting
a cleaner display.

The second parameter is /C. Using /C suppresses the display of the
count down timer. BatOut still waits the designated time, but there
is no display of the remaining seconds.

It's really nothing fancy, just a timer that you might find useful.

I've included a little demo batch file to show how it works. Try
doing nothing, then try it pressing any key. Now try it pressing the
key.



EPILOGUE:

This is a Free utility. I retain the copyright, but you may use it
to your heart's content. If you find this utility of use, you can
drop me a note on my BBS or route me a message at RIME Node ->PARADIGM
letting me know that you find it of value too. Of course if you felt
like sending .50 or a dollar, that certainly would not be turned down.



AUTHOR CONTACT:

Problems, solutions, kudos and ideas are welcomed. I can be reached
at the following:

The Paradigm BBS áETATech Computer Consulting
404/671-1581 P. O. Box 566742
1200-19,200 Baud 24 Hrs/Day Atlanta, GA 31156-6013



DISCLAIMER:

Use of this program acknowledges this disclaimer of warranty: "This
program is supplied as is. áETATech Computer Consulting disclaims all
warranties, express or implied, including, without limitation, the
warranties of merchantability and of fitness of this program for any
purpose. áETATech Computer Consulting assumes no liability for
damages direct or consequential, which may result from the use of this
program."



REVISION HISTORY:

15-NOV-1990 v1.0 Initial Release.

01-DEC-1990 v1.1 Recompiled with Turbo Pascal v6.0

10-FEB-1992 v1.2 Added /C and /T command line parameters.


  3 Responses to “Category : Batch File Utilities - mostly for DOS
Archive   : BATOUT12.ZIP
Filename : BATOUT.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/