PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: FileSlashReduction()[Next]: FindFileInPath()
\ -> Rexx -> Inbuilt PPWIZARD Functions -> FindFile()

FindFile()

This is an inbuilt function function provided by PPWIZARD.

The purpose of this routine is to search for a file. The return code is the full name of the file or the empty string ("") if it could not be located. This routine use used internally by PPWIZARD to search for files included with the #include command as well as other situations.

This routine takes one or two parameters as follows:

  1. LookingFor
    This is the partial name of a file which we are trying to locate (such as "HTMLPRE.IH" or "include\HTMLPRE.IH"). It may also be a complete filename.

  2. Die?
    If this parameter is non-blank then if the file is not found the routine will generate an error (normally it would return ""). If the value is "!" then a standard message is displayed otherwise the text of this parameter is included in the error message, for example if the file you were looking for was a dictionary file (whatever that meant) you could pass "dictionary".

The following locations are searched in order, using FindFileInPath():

  1. The Current Directory
  2. The Main Input Files Directory
  3. /INCLUDEPATH
    Any locations specified with the /IncludePath switch or IncludePath() routine.
  4. PPWIZARD_INCLUDE environment variable.
  5. INCLUDE environment variable.
  6. PPWIZARD Install Directory

If you need more information or control over where PPWIZARD looks for the file then you should also check out the FindFileInPath() routine (which is also used internally by this call).

Example

#DefineRexx '' TRACE_ON
   File1 = FindFile("htmlpre.ih");
#DefineRexx


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: FileSlashReduction()[Next]: FindFileInPath()


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am