FindFileEx Method

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Syntax

Engine.FindFileEx ( fileToFind, absolutePath, srchDirType, searchDirectoryIndex, userCancelled, promptOption = FindFile_PromptHonorUserPreference, srchListOption = FindFile_AddDirToSrchList_Ask, isCommand = False, [searchContext], [reserved])

Return Value

Boolean

Returns True if the file is found.

Purpose

Searches for a file in the TestStand search directories using a simple filename or relative pathname.

Parameters

fileToFind As String

[In] Specifies a string that contains the simple filename or relative pathname of the file to search for. TestStand expands macros in the path as specified by the Engine.ExpandPathMacros method before searching.

absolutePath As String

[Out] Returns the absolute pathname of the file if the file is found.

srchDirType As SearchDirectoryTypes

[Out] Returns the SearchDirectoryType in which the specified fileToFind was found. This can be any of the types located in SearchDirectoryTypes.

searchDirectoryIndex As Long

[Out] Returns the index of the TestStand search directory used to find the fileToFind specified. The list of search directories can be obtained by using the TestStand API SearchDirectories. You can retrieve any search directory from there using this searchDirectoryIndex.

userCancelled As Boolean

[Out] Returns True if the method prompts the user and the user cancels the find operation.

promptOption As FindFilePromptOptions

[In] Specifies whether to prompt the user if the file is not initially found.

This parameter has a default value of FindFile_PromptHonorUserPreference.

srchListOption As FindFileSearchListOptions

[In] Specifies file search options.

This parameter has a default value of FindFile_AddDirToSrchList_Ask.

isCommand As Boolean

[In] If this flag is True and fileToFind has no file extension, then the FindFile method searches for files with the same basename that end in the common command extensions: .exe, .com, and .bat.

This parameter has a default value of False.

searchContext As Variant

[In] [Optional] Contains the directory of the sequence file, which may also be searched for relative paths. This argument may be empty.

reserved As Variant

[In] [Optional] Reserved for future use.


See Also

Engine.ExpandPathMacros

SearchDirectoryTypes

Engine.FindFile

WAS THIS ARTICLE HELPFUL?

Not Helpful