home *** CD-ROM | disk | FTP | other *** search
-
-
- QWHICH (OS/2) - 1.00
- Documentation
-
- Copyright 1992-1993, Thomas G. Harold, All Rights Reserved.
-
-
- QWHICH execfile
- execfile - Name of the executable file to search for
- in the PATH statement directories. The name must not
- include an extension, and must be 8 characters or less.
- Wildcards are allowed.
-
- QWHICH is part of the QUTIL2 utilities package and may not be
- distributed seperately.
- QWHICH is a program that will scan the directories specified
- in the OS/2 PATH statment for executable files that match the
- execfile argument. Matching files will be printed to the screen
- or redirected to a file.
- QWHICH is useful for finding executable files that may "hide"
- one another because they were given the same name. Although this
- is not as big of a problem under OS/2, it still can crop up.
-
- -----------------------------------------------------------------
-
- I. Installation:
-
- Copy the qwhich.exe file to a directory in your PATH statement.
-
- II. Explanation:
-
- When an user types a command at the OS/2 prompt, OS/2 attempts
- to locate an executable file of the same name to execute. The
- first step that OS/2 takes is to check whether the command is one
- of its internal commands such as DIR, SET, ECHO. If the command
- is not one of OS/2's internal commands, then OS/2 checks the current
- directory for the executable file. If the executable file is not
- found in the current directory, then OS/2 proceeds to search all
- of the directories in the PATH statement until it finds a match.
- The problems used to start under DOS because DOS would saw off
- any extension that you might add to the filename. For example,
- it would turn the command, "MORE.COM", into "MORE". Thus the
- commands "MORE.BAT", "MORE.COM", "MORE.EXE" all get turned into
- "MORE". After sawing off the extension, DOS appends one of three
- proper extensions and searches for the file in each directory.
- The order of precedence among the three proper extensions is,
- (from first to last), ".EXE", ".COM", and ".BAT". This resulted
- in the file "MORE.BAT" being masked by "MORE.COM", both of which
- are masked by "MORE.EXE" if it exists. So even if you specify
- that you wanted to execute "MORE.COM", "MORE.EXE" would be
- executed instead if it is in the same directory as "MORE.COM".
- OS/2 avoids this problem by not sawing off the extension,
- but would still follow rules of precedence if the extension is
- not supplied. So even though QWHICH was originally written to
- solve the DOS extension problem, it is still useful under OS/2
- for checking for executable files which have the same name.
-
- -----------------------------------------------------------------
-
- History:
-
- 1.00 Oct 1992
- Original release version.
-
- 1.00 Apr 1993
- Ported to OS/2
-
-