## FileBrowser.FileBaseName

### Description

Returns the base name of the selected file ('foo' out of 'c:\myFolder\foo.txt'). This property can also be used to set the default file name to be displayed in the file browser. An empty String means that the user did not select any files.

### C# Syntax

    // get accessor
    String rtn = FileBrowser.FileBaseName;
    // set accessor
    FileBrowser.FileBaseName = String;

### Examples

#### VBScript Example

    dim oFileBrowser
    set oFileBrowser = XSIUIToolkit.FileBrowser
    oFileBrowser.DialogTitle = "Select a file"              ' set the title of the file browser
    oFileBrowser.FileBaseName = "foo"                               ' set the default file name to "foo"
    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 base name : " & oFileBrowser.FileBaseName
    ' the user did not select a file
    Else
                    logmessage "User pressed cancel"
    End If

### See Also

FileBrowser.FileExtension FileBrowser.FileName FileBrowser.FilePath FileBrowser.FilePathName FileBrowser.InitialDirectory