FME Flow: 2024.2
FTP Directory
The FTP Directory external action receives messages and uploads files to specified FTP hosts.
The FTP Directory external action has two output ports. The success port (✔) can send a message if the upload is successful. The failure port (x) can send a message if the upload fails.
Parameters
- Host: The FTP host name.
- Port: The FTP port number.
- Username: The FTP user name for authentication.
- Password: The FTP user password for authentication.
- Encryption: The encryption type, depending on the FTP server connection requirements. Options are None, FTPS and FTPES encryption protocols.
- Transfer Type: The transfer method. Auto means the FTP subscription will guess the file type of the file being transferred. ASCII and Binary are available options when the file type is known.
- Connection Type: The FTP connection mode. Passive Mode requires your FTP server to create connections using port numbers greater than 1023. Active Mode uses only ports 20 and 21 on the FTP server.
- Destination Path: The destination path to upload the file. File paths must use forward slashes (/) or escaped backslashes (\\). If the path does not exist, FME attempts to create it on the FTP server when the subscription runs.
- Source Path: The path to the source file to upload. To specify a Resources location, click the ellipsis (...). To specify another path, enter it in the text field directly. File paths must use forward slashes (/) or escaped backslashes (\\). Template macros are supported for this field (see below).
Example Configuration
Mouse-over to view screenshot:
In this example, the source files have been written to {OutputLocation}, as specified in the FILE_DOWNLOAD_SERVICE section of the FME Engine configuration file. FILE_DOWNLOAD_SERVICE is used to configure transformations for the Data Download Service. For more information about the FME Engine configuration file, see Configuration File Layout.
The files are uploaded to the "test" directory of ftpserver.com.
All FME Engine keywords defined for SUCCESS_RESPONSE and FAILURE_RESPONSE can be used as template macros. For example, the following SUCCESS_RESPONSE configuration in the FME Engine configuration file provides {OutputLocation}, {ResultRootDir}, {NumFeaturesOutput}, and {LogFileName} as available template macros:
SUCCESS_RESPONSE 0:Translation Successful|OutputLocation=!FME_AUTO_DIR_NAME!|ResultRootDir=/fmedatadownload/results|NumFeaturesOutput=!FME_NUM_FEATURES_OUTPUT!|LogFileName=datadownload/!FME_AUTO_FILE_NAME_SIMPLE.log! \
Output Attributes
See Also
Attribute | Description |
---|---|
time | Event time |
source | Event type |
file.path | (Success port only) File path |
error.type |
(Failure port only) Error type:
|
error.message | (Failure port only) Error message |
Retry
- Retry on failure: If checked, the automation attempts to run the action again if the initial attempt results in a failure to connect to the specified external resource for message delivery. The manner in which these retries are conducted is based on the remaining settings.
- Use custom retry settings: If checked, the remaining retry settings are configurable. If not checked, they are set to the FME Flow default values.
- Number of attempts: Maximum number of retries, if the action continues to fail.
- Wait between attempts: Time to wait between retries. In conjunction with Backoff multiplier (below), the specified value is the wait time for the first retry.
- Backoff multiplier: Factor by which to increase Wait between attempts on successive retries. For example, a value of 2.0 doubles the wait time for the next retry.
- Randomization factor: Percentage by which to introduce randomness to Wait between attempts. For example, if Wait between attempts is 100 Seconds, and Randomization factor is 25, the wait time for each retry is randomly selected between 75 and 125 seconds.
- Maximum wait between attempts: Maximum wait time between retries. In conjunction with Backoff multiplier, the specified value is the upper limit for wait time.