Engine.FindFile

Syntax

Engine.FindFile( fileToFind, absolutePath, userCancelled, promptOption = FindFile_PromptHonorUserPreference, srchListOption = FindFile_AddDirToSrchList_Ask, isCommand = False, [currentSequenceFile])

Return Value

Boolean

Returns True if the file is found.

Purpose

Note This method is obsolete. Use the Engine.FindFileEx method intead.

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.

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 .

currentSequenceFile As Variant

[In] [ Optional ] If you pass a SequenceFile object for this parameter, the FindFile method initially searches the directory where the sequence file is stored if the Current Sequence File Directory option is enabled. Enable the current sequence file directory in the sequence editor by selecting Configure»Search Directories and enabling the Current Sequence File Directory option.

See Also

Engine.ExpandPathMacros

Engine.FindPath

Engine.SearchDirectories

FindFilePromptOptions

FindFileSearchListOptions

Omitting Optional Parameters

SearchDirectoryTypes

Using the $(Platform) Path Macro to Locate the Correct Code Module in 32-bit TestStand and 64-bit TestStand