home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
sysutils
/
qexist
/
qexist.doc
< prev
next >
Wrap
Text File
|
1989-08-24
|
2KB
|
60 lines
Query Existance
by
Paul Martin
QEXIST.EXE is a program that will act similar to the COMMAND.COM
command IF EXIST. There is one major difference though and that is
QEXIST will return an ERRORLEVEL to your BAT or CMD file with different
error codes for different errors. These error codes are the DOS and OS/2
error codes so they have the same meaning. QEXIST also traps hard errors
such as DRIVE NOT READY and SECTOR NOT FOUND, this will allow you to
trap those nasty abort, retry, ignore messages or for those of you
running under OS/2, those irritating popup dialog boxes. I have
included two command files (one for DOS and the other for OS/2)
although they are virtually the same. These files will give you an
example of how QEXIST works.
An Example of Using QEXIST:
.
.
.
ECHO *** INSERT INSTALL DISK IN DRIVE A: ***
QEXIST A:INSTALL.DAT
IF ERRORLEVEL 21 GOTO NODISK
IF ERRORLEVEL 2 GOTO NOTFOUN
GOTO CONTINST
.
.
.
QEXIST.EXE was written in "C" and is a bound executable. This means it
will run under OS/2 and DOS.
Feel free to distribute this program and make as many copies as
your heart desires, but you must not alter the program in any way
and you must distribute this documentaion file unaltered.
If you find this utility useful, all I ask is that you send me
$5.00 for my effort.
Send checks, money orders, loose diamonds, and of course cash to:
Paul Martin
901-A Ohio Pike
Cincinnati, Ohio
45245
If you find any bugs or have any questions, you can reach me through
USENET at pmartin@ucqais.uc.edu or through a local BBS I frequent, called
C.C.C. (513)752-8248, (513)752-1544, (513)752-1542, (513)752-1055,
(513)752-8239, (513)752-0121, (513)752-0730