FileName Property

Applies to TestComplete 14.70, last modified on April 22, 2021

Returns the full path to the selected file.

Declaration

componentObj.FileName
Read-Write Property String
componentObj     One of the user forms components listed in the Applies To section  

Applies To

The property applies to the following components:

TOpenDialog, TSaveDialog

Description

The FileName property returns the name and directory path of the file that is selected in the dialog. If the ofAllowMultiSelect option is enabled then this property returns the path to the file that was selected last. To get the whole list of the selected file use the Files property.

Property Value

A string value that contains the full path to the last selected file.

Remarks

If the user closes the dialog with the Cancel button, the FileName property restores the value it had before the dialog was displayed.

See Also

Files Property

Highlight search results