Skip to content

[Back to Parameters]

File

A widget that allows the user to select a file or folder on the local file system.

Specification

  • accessMode one of 'read', 'write' or 'readwrite' to indicate if this path represents a path that is a 'source' or a 'destination' or both. This information is used to determine things like which file paths need updating when uploading to FME Server or which files need to be included in a workspace template
  • validateExistence if true the file or folder must already exist on the filesystem
  • itemsToSelect one of 'files', 'folders', 'filesAndFolders', 'filegeodb', or 'esriLayers'
  • selectMultiple if true the browser will allow selection of multiple files and the value will be saved as a list instead of a string
  • filters (optional) a list of dictionaries of the form (If an empty list is specified all extensions will be selectable):
  • filter a list of filter strings in *.extension form
  • description the description of the filter

  • includeWebBrowser (optional) if true show an option to browse web as a filesystem. Default is false

  • allowURL (optional) if true a URL is a valid replacement for a local path. Note this turns off any path validation. Default is false
  • separate (deprecated, optional) if true allows users to specify a destination filename and optionally a suffix to append to the dataset. Used in FME Quick Translator to translate multiple source datasets into separate destination datasets. Default is false

Example

{
  "name": "somefile",
  "type": "file",
  "valueType": "list",
  "prompt": "Files to Read",
  "accessMode": "read",
  "validateExistence": true,
  "itemsToSelect": "files",
  "selectMultiple": true,
  "filters": [
    {
      "filter": ["*.xls", "*.xlsx"],
      "description": "Microsoft Excel Files"
    },
    {
      "filter": ["*.csv"],
      "description": "CSV Files"
    }
  ]
  "includeWebBrowser": true,
  "allowURL": false
}