FileBrowser.FileName

Description

Returns the file name and extension of the selected file ('foo.txt' out of 'c:\myFolder\foo.txt'). An empty String means that the user did not select any files.

Examples

VBScript Example

dim oFileBrowser
set oFileBrowser = XSIUIToolkit.FileBrowser
oFileBrowser.DialogTitle = "Select a file"              ' set the title of the file browser
oFileBrowser.Filter = "All Files (*.*)|*.*||"   ' Allow selection of all files
oFileBrowser.ShowOpen                                                   ' show an open file dialog
logmessage VB_LF
' if the user selected a file
If oFileBrowser.FilePathName <> "" Then
                logmessage "File Name : " & oFileBrowser.FileName
' the user did not select a file
Else
                logmessage "User pressed cancel"
End If

See Also

FileBrowser.FileBaseName FileBrowser.FileExtension FileBrowser.FilePath FileBrowser.FilePathName