|Declaration:||function FileDetect (FileMask: string):
The function FileDetect recursively searches for a file which matches the string specified in the parameter FileMask. The parameter FileMask may contains wildcards in the filename and extension but not in the path. The function returns an empty string if no file matches the mask. On success, the fully qualified filename of the first matching file is returned.
||The function FileDetect may require considerable time when called on a large disk volume and using a file mask containing a path with many subdirectories (i.e. the root directory).
||Be careful when using UNCs. A UNC is defined as //host/share/path. If you omit either the host or the share FileDetect won't work and will return an empty string.