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

Find File In Directory List Function
File Names Class

Public Function FindFileInDirectoryList( _
      ByVal vFile As Variant _
    , ByVal vDirList As Variant _
    , Optional ByVal vSeparator As Variant _
    , Optional ByVal vAttributes As Variant _
    ) As Variant

Return the name of the first directory in the string list that contains a specific file.
For example, find "DAO2016.DLL" within the directory list "C:\WINDOWS C:\WINDOWS\SYSTEM C:\WINDOWS\OLESVR".

Example:
    ? est.FindFileInDirectoryList("DAO2016.DLL", "C:\WINDOWS C:\WINDOWS\SYSTEM")
    C:\WINDOWS\DAO2016.DLL
See also:
    FindFileUpwards Function
    DirToVariantVector Function
vFile: Name of the file that is to be located within the specified directories. Function returns Null if vFile is null or cannot be fixed-up to a string.

vDirList: ("Directory List") String containing the names of the directories that will be searched for a file named vFile. Function returns Null if vDirList is null or cannot be fixed-up to a string.

vSeparator: String that separates the directory names within string vDirList. vSeparator defaults to the space character if it is missing or Null or cannot be fixed-up to a string.

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.