On this Page

    _file.getOpenFileName

    Prompt user for a file to Open.

    Syntax

    _file.getOpenFileName([folder], [title], [filetypes], [defaultfile])

    Parameters

    All parameters are optional or can be replaced by null.

    folder - the local file folder that should be displayed to start with.

    title - alternate text to appear in the Open dialog's title area.

    filetypes - a string that customizes the dialog with default file types to display. If omitted, all files are displayed. The string must be formatted as a sequence of pairs of descriptors - a text (display) string followed by one or more wildcard file extension specifications. Each item in the list must be separated by the vertical bar character. Example:

    "Form Files|*.xatw|Data Files|*.xml;*.dat|All Files|*.*"

    The above string displays 3 filetype options: one for all XATW files, one that displays DAT and XML files, and one that displays all files. By default, all files are shown.

    defaultfile - a default filename to be displayed in the dialog. Only the filename and extension (no folder path) is required.

    Returned Value

    If the user selects a file, the full path+filename is returned. Otherwise returns null.