PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: FindFile()[Next]: FileCopy()

FindFileInPath()

This is a rexx function provided by PPWIZARD. This routine (like all PPWIZARD extensions) can be used with any operating system supported by PPWIZARD.

The purpose of this routine is to search for a file. It gives you full control over where it searches, unlike the FindFile() routine. If you want the current directory searched then you need to specify this!

The return code is the full name of the file or the empty string ("") if it could not be located.

This routine takes 2 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").

  2. DirList
    This is a list of items separated by ";" (or colon for unix).

    If the item begins with a "*" character then what follows is the name of an environment variable whose contents should be searched.

    If the item begins with a "+" character then what follows is the name of a directory. You wish the whole directory tree to be searched. Note that depending on the size of the tree you could significantly slow down searching (be careful).

    If the items does not begin with any special character then it is simply the name of a directory to be searched.

Example

    #DefineRexx '' "$TRACE"
       File1 = FindFileInPath("ppwizard.rex", "+c:\webimage;*PATH;c:\any\dir1;*REGINA_MACROS;+c:\any\dir2tree");
    #DefineRexx
    


[Top][Contents][Search][Prev]: FindFile()[Next]: FileCopy()

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Thursday January 17 2002 at 6:27pm