|Everything HP200LX: Knowledge, Products, Service|
Small Enhancements for the DOS batch file Language
If you've ever tried to create a complex batch file, you'll recall how difficult it was to develop an "IF... THEN...ELSE" statement. The normal IF command in DOS can only test for three things: 1) the existence of a file, 2) the equality of two strings or 3) an Errorlevel value returned at the end of a program. IFF40 is a small program that will let you enhance the DOS "IF" command in several useful ways. The program is a standard DOS program: not a TSR. It may be used at the DOS prompt or put inside batch files. It returns a range of Errorlevel numbers that can be interpreted by the normal IF ERRORLEVEL batch command. The various things that IFF40 will test for include the following:
A - Actual RAM Available
C - sCan a whole disk for a file
D - has the Date been reset?
E - checks for Empty drives
L - checks the Label of a disk
M - lets you build a simple Menu similar to one that uses the DOS Choice command.
P - Prompt is a variation on the M (Menu) option.
Q - Question allows for Y or N response.
R - seaRch will let you search for multiple files in a list
S - Size tests for the space left on a disk
X - tests for eXpanded (EMS) memory by pages.
Some of the functions in this program are duplicated by other DOS commands but the RAM test is unique as is the test for Date. The latter test could be most useful on the Palmtop where the occasional hard reset alters the system date and messes up the Appointment Book. The IFF40.ZIP archive contains about 10 sample batch files to get you started. IFF40 is the work of John Knauer, Jr. CSi 75236,1466 and is freeware.
Copyright © 2010 Thaddeus Computing Inc