Skip to main content
Skip table of contents

FTP Connector (Advanced)

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

Properties

Operation (action)

Determines which file transfer operation is performed on the processed files or folders.

Possible values:

  • List: Output 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 parameter remotePath, using the file name specified in parameter documentName. Or send multiple files from source folder in parameter localPath to remotePath by setting parameters directoryMode and multipleFiles to true; a filter expression can also be specified in parameter filter.

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

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

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

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

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

Parameters

Adapter

Main class of the adapter (do not change!)

Possible values: en.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 (e.g. server.tld)

port

Port number of the FTP(S)/SFTP server

Possible values:

  • Any positive integer

  • 22: SFTP standard port (default)

login

Username for the FTP(S)/SFTP connection

password

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

accountInfo

For additional information on the account, see also the FTP library documentation.

loginCommandsUrl

URL to the XML file in the XStore that contains the login commands.

Possible values: Any XStore URL

filter

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

Possible values: Any character string (e.g. *.xml)

multipleFiles

Process all files that match the filter criterion in parameter filter

Possible values:

  • true: Process all applicable files

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

append

Append sent data to the destination file if a destination file with the same name already exists (only with Operation Send).

Possible values:

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

  • false: Overwrite destination file (if available) (default)

localPath

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

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

directoryMode

Enable folder mode to process the content of folders; if parameter multipleFiles is enabled, all items matching the filter criterion in parameter filter are processed

Possible values:

  • true: Process folder

  • false: Process single files only (default)

transferMode

Transmission type

Possible values:

  • BINARY: Transfer as binary file (default)
  • TEXT: Transfer as text
connectMode

Connection mode

Possible values:

  • ACTIVE: Active connection mode
  • PASSIVE: Passive connection mode (standard)
remotePath

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

Possible values: Any string (e.g. folder/subfolder)

documentname

Name of the folder or file that will be processed. If directoryMode=true is set, the folder name is expected in the parameter.

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

oldDocumentname

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

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

oldPath

Path to the folder or file on the FTP(S)/SFTP server to be moved (only for Operation Move).

Possible values: Any character string (e.g. folder/subfolder)

recurse

Delete path recursively, i.e. including all subfolders and files (only with Operation Delete).

Possible values:

  • True: Delete all included folders (and subfolders) and files.

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

deleteAfterReceive

Delete file or folder after receiving from FTP(S)/SFTP server (only with Operation Receive)

Possible values:

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

  • false: Keep original file or folder (default)

deleteAfterSend

Delete file or folder after sending to FTP(S)/SFTP server (only with Operation Send)

Possible values:

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

  • false: Keep original file or folder (default)

maxTransferRate

Maximum transmission 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 (enables the definition of a rest period in the sleepTime parameter).

  • false: Disable sleep mode (default)

sleepTime

Waiting time in seconds between the transfer of the files (if parameters multipleFiles and sleepEnabled are activated).

Possible values:

  • Any positive integer (default)

  • 0: No use of rest time

timeout

Time limit for TCP connection establishment and transmission in milliseconds

Possible values:

  • Any positive integer (e.g. 50000)

  • 0: No time limit (default)

hostValidationEnabled

Activate host validation to ensure that the requested FTP(S)/SFTP server also corresponds to the FTP(S)/SFTP server to which you are connecting. Ideally, deactivate for test purposes only!

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 productive systems) (default)

implicitFTPS

Enable Implicit FTPS

Possible values:

  • true: Enable Implicit FTPS (set flag)

  • false: Disable Implicit FTPS (default)

securityMechanism

Safety 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 on the FTP(S)/SFTP server with a private key, then 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: Execute operations via the File Transfer Protocol (default)

  • FTPS: Execute operations via File Transfer Protocol Secure

  • SFTP: Execute operations via the SSH File Transfer Protocol

useProxy

Use proxy server to establish connection

Possible values:

  • true: Use proxy server

  • false: Do not use proxy server (default)

proxyType

Proxy server type

Possible values:

  • HTTP: Use HTTP proxy (default)

  • SOCKS4: Use proxy based on SOCKS 4 protocol

  • SOCKS5: Use proxy based on 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 e.g. for active FTP transfers if the FTP(S)/SFTP server has to 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

Username for the proxy server

proxyPassword

Password for the proxy server

controlEncoding

Coding used for the command channel. This influences how umlauts are transmitted in file names. This value depends on the FTP server.

Possible values: UTF-8 (Standard)

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 as controlEncoding on the connection.

Status values

1The operation was executed successfully.
-1The operation failed due to a technical error.

Input

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

The different login operations have an order. If the respective parameters are filled, 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 parameter directoryMode is deactivated), the received document is output for the operation Receive.

For the List operation, an XML document with the list of folders and files is output.

JavaScript errors detected

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

If this problem persists, please contact our support.