Skip to main content
Skip table of contents

FTP Connector (Advanced)

This adapter supports the FTP (File Transfer Protocoll), SFTP (SSH File Transfer Protocol) and FTPS (File Transfer Protocol Secure or FTP-SSL) protocols for sending, receiving, deleting, moving one or more files and folders, and listing folder contents. The adapter supports HTTP, SOCKS4 , and SOCKS5 proxy servers.

Properties

Operation

Determines which file transfer operation will be executed on the processed files.

Possible values:

  • List: Return the list of files in the folder specified in the remotePath parameter as an XML document

  • Send: Save data from the previous process step to the folder specified in the remotePath parameter, using the file name specified in the documentName parameter. Or send multiple files from source folders in the localPath parameter to remotePath by setting the directoryMode and multipleFiles parameters to true. A filter expression can also be specified in the filter parameter.

  • Receive: Read a file into the process whose path was specified in the remotePath parameter and whose file name was specified in the documentName parameter. Or receive multiple files by setting the directoryMode and multipleFiles parameters to true and localPath to the local destination folder. A filter expression can also be specified in the filter parameter.

  • Delete : Delete the file or folder specified in the documentName parameter on the FTP(S)/SFTP server whose path is specified in the eemotePath parameter. To delete non-empty folders, also activate the recurse parameter.

  • Move: Move a file or folder specified in the oldpath parameters with oldDocumentname within the FTP(S)/SFTP server to remotePath with documentname

  • Make directory: Create a folder on the FTP(S)/SFTP server whose name is specified in the documentName parameter and whose path is specified in the remotePath parameter

  • Delete directory: Delete folders on the FTP(S)/SFTP server whose name is specified in the documentName parameter and whose path is specified in the remotePath parameter

Parameters

Adapter

Main class of the adapter (do not change!)

Possible values: de.softproject.integration.adapter. transferadapter.TransferAdapter: Main class (default)

host

IP address or host name of the FTP(S)/SFTP server

Possible values: Any valid string (for example, server.tld)

port

Port number of the FTP(S)/SFTP server

Possible values:

  • Any positive integer

  • 22: SFTP default port (default)

login

User name for the FTP(S)/SFTP connection

password

Password for the FTP(S)/SFTP connection. If the privateKeyFile parameter is set: password of the private key

accountInfo

For additional information about the account, see the FTP library documentation

loginCommandsUrl

URL to the XML file in the XStore containing the login commands

Possible values: Any XStore URL

filter

Filter expression that matches the wildcards * and ? to limit the amount of files processed. This applies to the list operation and the receive and send operations and only if the multipleFiles and directoryMode parameters are activated.

Possible values: Any valid string (for example, *.xml)

multipleFiles

Process all files that match the filter criteria in the filter parameter

Possible values:

  • true: Process all applicable files

  • false: Process only the file specified in the documentName parameter, or if the directoryMode parameter is enabled, process the first file (if the filter criterion applies to multiple files) (default)

append

Attach sent data to the destination file if a destination file of the same name already exists (only for Send operation)

Possible values:

  • true: Append data in the target file (if any)

  • false: Overwrite target file (if any) (default)

localPath

Local folder for sending or receiving multiple files (only if the directoryMode and multipleFiles parameters are enabled)

Possible values: Any valid path specification (e.g. C:\Directory)

directoryMode

Activate folder mode to process the contents of folders. If the multipleFiles parameter is activated, all elements that correspond to the filter criterion in the filter parameter are processed.

Possible values:

  • true: Process folders

  • false: Process only individual files (default)

transferMode

Type of transmission

Possible values:

  • BINARY: Transfer as a binary file (default)

  • TEXT: Transfer as text

connectMode

Connection mode

Possible values:

  • ACTIVE: Active connection mode

  • PASSIVE: Passive connection mode (default)

remotePath

Path on the FTP(S)/SFTP server whose destination folder is to be manipulated via FTP(S)/SFTP

Possible values: Any string (e.g. Folder/Subfolder)

documentname

Name of the folder or file being processed. If directoryMode=true, the folder name is expected in the parameter.

Possible values: Any valid string (e.g. Data.xml)

oldDocumentname

Name of the file to be moved (only for the Move operation)

Possible values: Any valid string (e.g. Data.xml)

oldPath

Path to the folder or file on the FTP(S)/SFTP server that is to be moved (only for the Move operation)

Possible values: Any string (e.g. Folder/Subfolder)

recurse

Delete the path recursively, i.e. including all subfolders and files (only for the Delete operation)

Possible values:

  • true: Delete all included folders (and subfolders) and files

  • false: Delete only folders and files in the current path (default)

deleteAfterReceive

Delete the file or folder after it has been received from the FTP(S)/SFTP server (only for the Receive operation)

Possible values:

  • true: Delete the original file or folder after it is received on the FTP(S)/SFTP server

  • false: Keep original file or folder (default)

deleteAfterSend

Delete the file or folder after sending it to the FTP(S)/SFTP server (only for the Send operation)

Possible values:

  • true: Delete the original file or folder after sending it to the FTP(S)/SFTP server

  • false: Keep original file or folder (default)

maxTransferRate

Maximum transfer rate in bytes/second

Possible values:

  • Any positive integer

  • 0: no limit (default)

sleepEnabled

Activate sleep mode (if parameter multipleFiles is activated)

Possible values:

  • true: Activate sleep mode (allows you to define a sleep time in the sleepTime parameter)

  • false: Disable sleep mode (default)

sleepTime

Wait in seconds between the transfer of the files (if multipleFiles and sleepEnabled parameters are enabled)

Possible values:

  • Any positive integer (default)

  • 0: Do not use sleep time

timeOut

Time limit for TCP connection establishment and transmission in milliseconds

Possible values:

  • Any positive integer (e.g., 50000)

  • 0: No timeout (default)

hostValidationEnabled

Enable host validation to ensure that the requested FTP(S)/SFTP server also matches the FTP(S)/SFTP server that is connected to. Ideally, deactivate only for testing purposes!

Possible values:

  • true: Enable host validation (set flag)
    (info) If host validation is enabled, the hostsFileName parameter must be set.

  • false: Disable host validation (not recommended for production systems) (default)

implicitFTPS

Enable Implicit FTPS

Possible values:

  • true: Enable Implicit FTPS (set flag)

  • false: Disable Implicit FTPS (default)

securityMechanism

Security mechanism

Possible values:

  • Explicit_TLS

  • Explicit_SSL

  • Explicit_TLS_C.

  • Implicit_PRIVATE

  • Implicit_CLEAR

privateKeyFile

Path to a private key file (not: Java Keystore). If you want to authenticate yourself with a private key on the FTP(S)/SFTP server, the password parameter serves as the password for your private key file.

Possible values: Any valid path (e.g. C:\Data\X4Keys\id_rsa

hostsFileName

Path to the Known Hosts file, which contains a list of confirmed hosts and their associated public keys

Possible values: Any valid path (e.g. C:\data\known_hosts)

(info) The Known Hosts file must be structured as follows:

CODE
host,IP Verschlüsselung Host_PublicKey
ftp.softproject.de,217.160.223.49 ssh-rsa AAAAB3NzaC1yc2EAAAA...

protocol

File transfer protocol

Possible values:

  • FTP: Perform operations using the File Transfer Protocol (default)

  • FTPS: Perform operations using the File Transfer Protocol Secure

  • SFTP: Perform operations using the SSH File Transfer Protocol

useProxy

Use a proxy server to connect

Possible values:

  • true: Use a proxy server

  • false: Do not use a proxy server (default)

proxyType

Proxy server type

Possible values:

  • HTTP: Use HTTP proxy (default)

  • SOCKS4: Use a proxy based on the SOCKS 4 protocol

  • SOCKS5: Use a proxy based on the SOCKS 5 protocol

proxyAddress

IP address or host name of the proxy server

Possible values: Any valid string (e.g. server.tld)

proxyPublicAddress

Public IP address or host name of the proxy server if the proxy does not return an address (required, for example, for active FTP transfers, if the FTP(S)/SFTP server must reconnect to the proxy)

Possible values: Any valid string (e.g. server.tld)

proxyPort

Port number of the proxy server

Possible values: Any positive integer

proxyUsername

User name for the proxy server

proxyPassword

Password for the proxy server

controlEncoding

The encoding used for the command channel. This affects how umlauts are transferred to file names. This value depends on the FTP server.

Possible values: UTF-8 (default)

If no controlEncoding is set or the controlEncoding corresponds to the empty string, the connection is not modified and the controlEncoding is undefined. Otherwise, the value is set to the connection as controlEncoding.

maxQueuedReadRequests

Specifies how many read requests are sent to the SFTP server at the same time.

Possible values:

  • Any integer

Note:

Some older or non-standard SFTP servers do not support parallel read requests. In this case, the error FXP_READ mismatch may occur. Set the value to 1 to disable parallel read requests and connect.

Status values

1

The operation was successful.

-1

The operation failed due to a technical error.

Input

In file mode (if the directoryMode parameter is disabled), an input document is expected to be sent for the Send operation.

The different login operations have a sequence. If the respective parameters are filled, the following applies:

  1. Login commands are used.

  2. User/password with AccountInfo is used.

  3. User/password is used.

Definition of the LoginCommands XML:

XML
<loginCommands>
    <loginCommand>cmd1</loginCommand>
    <loginCommand>cmd2</loginCommand>
</loginCommands>

Output

In file mode (if the directoryMode parameter is disabled), the Receive operation outputs the received document.

The List operation returns an XML document containing the list of folders and files.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.