SearchDirectories.Insert
- Updated2025-07-21
- 2 minute(s) read
SearchDirectories.Insert
Syntax
SearchDirectories.Insert( path, index = -1, searchSubDirs = False, fileExtRestrict = "", exclude = False, disabled = False)
Purpose
Adds a new item to the collection.
Remarks
A search directory is a search path for finding files.
Parameters
path As String
[In] Specifies the path used to find files.
index As Long
[In] TestStand maintains an internal list of search directories in which the lower index paths take precedence over the higher index paths. The index parameter specifies the index where the new search directory must be inserted. If you pass a value of -1, the new directory is inserted at the end of the list.
This parameter has a default value of -1 .
searchSubDirs As Boolean
[In] Specifies whether to include all subdirectories within the selected path in the overall search path.
This parameter has a default value of False .
fileExtRestrict As String
[In] Specifies the specific file extensions that restrict which files apply to the search directory. If the exclude parameter is False , TestStand searches in the directories only for files with the specified extensions. If the exclude parameter is True , TestStand searches in the directories for files that do not have the specified file extensions. For example, to search for only DLLs and executable files, pass "DLL,EXE" for this parameter and False for the exclude parameter.
This parameter has a default value of "" .
exclude As Boolean
[In] If you pass False , TestStand searches only for files with the specific file extensions specified in the fileExtRestrict parameter. If you pass True , TestStand searches for files without the specific extension.
This parameter has a default value of False .
disabled As Boolean
[In] Set this parameter to False if you want the search directory to be included in the overall search path. This setting allows the user to disable the search directory without deleting it from the list.
This parameter has a default value of False .