Make your batch files take their time
Ever wish a running file would wait to let you interact with it but not force
you to press buttons to accept its default? WAIT.COM is a short ulitity that
lets you bulid a delay into any batch file and determines its duration on s case-by-case
basis. If you press any key before WAIT.COM reaches its timeout, it return an
errorlevel that can take you past a step in your batch file. This is particulary useful
inserted in AUTOEXEC.BAT--it enables you to change your default setup or let it by.
To create WAIT.COM, enter the following lines in atext editor, and save it in
your utilites subdirectory as an ASCII text file cakked WAIT.SCR.
N WAIT.COM
E 0100 BF 5B 00 33 C0 33 C9 33
E 0108 D2 BE 82 00 38 4C FE 74
E 0110 2D AC 3C 0D 74 16 2C 30
E 0118 72 F7 3C 09 77 F3 8B DA
E 0120 D1 E2 D1 E2 03 D3 D1 E2
E 0128 03 D0 EB E5 0B D2 74 0E
E 0130 B8 B6 00 F7 E2 33 D2 BB
E 0138 0A 00 F7 F3 8B F8 B8 40
E 0140 00 8E D8 BB 6C 00 8B 77
E 0148 02 03 3F 13 F1 8B 07 8B
E 0150 57 02 38 4F 04 74 03 83
E 0158 C2 18 3B D6 72 06 77 0E
E 0160 3B C7 73 0A B2 FF B4 06
E 0168 CD 21 74 E1 FE C1 8A C1
E 0170 B4 4C CD 21
RCX
0074
W
Q
Return to the DOS prompt, change to your utilites subdirectory if necessary, and
enter DEBUG < WAIT.SCR to create the executable file WAIT.COM. To use the program,
insert the word WAIT on its own line in abatch file, folled by a number
that represents how manu seconds you want the file to wair before ot moves to the
next line.On the following line, insert IF ERRORLEVEL 1 GOTO followed by a location
name (such as SKIP in the example below). use the following example as a
template: The batch waits tem seconds before backing up or skips to an impertinent
message at the end oif you press a key.
ECHO Will back up in 10 seconds unless you press a key
WAIT 10
IF ERRORLEVEL 1 GOTO SKIP
BACKUP C:\*.* /S A:
GOTO END
:SKIP
ECHO Hey, you relly should back up.
:END
written by: ED QUILLEN
GO BACK TO DEBUG HOME PAGE
GO BACK TO HOME PAGE