FTP command service

FTP command service

The FTP Command Service makes it possible to send one of the following commands to the FTP Server:

Commando

Opties

Description

ls

 

The ls command gives back information about the files in the given remote directory.

The return value is a list of FileInfo objects.

 

-1

Only returns a list of the file names in the given remote directory.

The return value is a list of Strings.

 

-a

Executes ls on all files in the remote directory (also hidden files).

The return value is a list of FileInfo objects.

 

-f

Does not sort the retreived list.

The return value is a list of FileInfo objects.

 

-dirs

Also returns the folders in the remote directory.

The return value is a list of FileInfo objects.

 

-links

Also returns symbol links in the remote directory.

The return value is a list of FileInfo objects.

 

-R

Executes the command recursively, files in subfolders are also returned.

The return value is a list of FileInfo objects.

get

 

Retrieves a file from the FTP Server.

The return value is a File.

 

-P

Retains the original timestamp on the external file.

The return value is a File.

mget

 

Retreives multiple files from the FTP Server via a pattern or regex.

The return value is a list of File Objects.

 

-P

Retains the original timestamps on the external files.

The return value is a list of File Objects.

 

-x

Returns an exception when no files satisfy the filter. If this is not used an empty list is used in that case.

The return value is a list of File Objects.

rm

 

With this command a File can be removed from the FTP Server. The filename has to be entered for this.

The return value is a Boolean (‘true’ if the file is succesfully removed).

mv

 

With this command a file can be moved on the FTP Server. You can choose to use the move-target-filename properties for the new filename, if the old filename is used, these properties don’t have to be entered and the remote-filename will be used.

The return value is a Boolean (‘true’ if the move has been succesful).

 

Depending on the chosen command and potential command-options the response can for instance be a FileInfo Object for the ls command or a Boolean for the rm command.

 

As you select sFTP as FTP Type, the following extra fields will be added to the form.

In the table below, you will find an explanation of these properties. All attributes with a ‘*’ are mandatory.

Attribute

Description

Name*

By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional.

Enabled

Check this box if you want this service to be enabled.

FTP Host*

FTP server Hostname.

FTP Port

FTP server port. The default is 21, or 22 for sFTP.

FTP Username*

FTP server username.

FTP Password*

FTP server password.

FTP Mode

FTP server mode, either Active or Passive.

FTP FileType

FTP server file type, either ASCII, Binary or EBCDIC.

FTP Buffer-size

FTP buffer size.

Remote-Directory

Remote directory path on FTP server.

Remote-Directory-From-Header

This header specifies remote directory path.
Remote-File-Separator Specify file separator character. The default is '/'.
MessagePart-In Name of the MessagePart in a ConnectMessage where the content of the file is being stored.

MessagePart-Out

Name of the MessagePart to which the content should be written.
Filename-Extension

Here, you can define the files’ extension. The default is '.xml'.

Specify File-name Use the content of this header attribute as the file name. File-consumer and FTP-consumer will set original file name in header attribute file_name. Default header attribute for file_name is connectmessageID.

Serialize

The indicated message part will be serialized to disk if possible. Combination of messagepart=ALL and serialize=true will serialize ConnectMessage to disk.

Auto-Create-Remote-Directory

Select TRUE to automatically create remote directory on server.
Command

See table in documentation for an overview of possible commands.

Local-Directory

If the command ‘(m)get’ is used, you can specify the location where the files of the ‘(m)get’action have to be saved here. This can be a relative path. Files that are saved to this folder remain here after downloading.

Command-Options

See table above for an overview of possible options.

Local-Filename-Generator-Expression

Add an expression that is used for creating the filename of a downloaded file. For example: #remoteFileName.toUpperCase().

Temporary-File-Suffix

Add the suffix which is used in creating the temporary file.

Move-Target-Directory

If the ‘move’ command is used, you can specify the location to where the files are being moved.

Move-Target-Directory-From-Header

If the ‘move’ command is used, you can specify the name of the MessageProperty of the directory the files must be moved to. With this, you can dynamically set the location. You can specify this property through a header-enricher.

Move-Target-Filename

If the 'move' command is used, you can set the name that the file should get after the move. If this field and the Filename From Header are not used, the remote filename is used as filename.

Move-Target-Filename-From-Header

If the move command is used, you can enter the name of the MessageProperty, that specifies what the name of the moved file should be. You can specify this property through a header-enricher.

Remote-Filename

Specify a fixed name for the remote file.

Remote-Filename-From-Header

Name of the header property in the ConnectMessage which is used to generate the filename. If you enter file_name, the original filename is used. By default a unique ID is used.

Remote-Filename-Pattern

Specify a pattern for the remote filename.

Remote-Filename-Regex

Specify a regular expression for the remote filename.

Description

Description of the specific service. This is for documentation purposes.

  

SFTP Private-Key

Specify location of SFTP private key file. Must be in URL form using the file: , http: or classpath: prefix.

SFTP Private-Key Pass-Phrase

Passphrase for SFTP private key file.

SFTP Server Alive Countmax

The amount of server alive messages, that can be sent without a reply, before being disconnected.

SFTP Server Alive Interval

This is the interval in milliseconds between two server alive messages.

SFTP Socket Time-Out

SFTP socket time-out. 0 means no time-out.

SFTP Key Exchange

SFTP Key Exchange configuration for SSH Client. When a specific set of cipher keys is required you can override it here. You may also use the system-wide property -D sftpKexConfiguration='' .

FTPS with implicit encryption

As of version 3.5.0, if you choose implicit FTPS you can set the field Implicit TLS to true. This field will appear only if you choose FTPS. The other field is Session Reuse, this field tells you if you want to reuse the TLS session of this FTPS session.

 

Attribute Descrioption
Session Reuse This indicates the reuse of the TLS session when connecting over FTPS
Implicit TLS Enable implicit FTPS TLS