Overview | Methods | This Package | All Packages
Retrieves the file name of the selected file.
Syntax
public final String getFileName()
Return Value
Returns the file name of the selected file. The name of the file includes both the file path and the extension. If multiple files are selected, this method returns the first file name in the list. If no file is selected, this method returns an empty string.
Remarks
This method can return only the name of one selected file. If you want to return an array containing the names of all selected files in a multiple-selection dialog box, use the getFileNames method. See the SaveFileDialog control topic for a code example using this method.
See Also setFileName