FileName Property

Applies to TestComplete 15.64, last modified on June 12, 2024

Returns the full path to the selected file.


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


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.


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