<-- Previous || Up || Next -->

Find File Upwards Function
File Names Class

Public Function FindFileUpwards( _
    ByVal vPath As Variant _
    , Optional ByVal vAttributes As Variant _
    ) As Variant

Find the first file named vPath by starting in some directory and searching up the directory hierarchy until the drive root is reached.
For example, search for "FTPINFO.TXT" in "C:\ENTISOFT\TOOLS", "C:\ENTISOFT" and "C:\"
Return empty string if the named file was not found.

Example:
    ? FindFileUpwards("C:\Entisoft\Autoexec.Bat")
    C:\Autoexec.Bat
See also:
    FindFileInDirectoryList Function
    DirToVariantVector Function
vPath: Path name that combined the starting directory with the name of the file to be found. Function returns Null if vPath is Null or cannot be fixed-up to a string. For example, specify a path of "C:\Entisoft\Tools\Autoexec.Bat" to start the search for file "Autoexec.Bat" in directory "C:\Entisoft\Tools"
vAttributes: One or more of the vb constants vbNormal, vbHidden, vbSystem, vbVolume, and vbDirectory describing the types of files to be included in the search. vAttributes defaults to vbNormal if it is missing or Null or cannot be fixed-up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.