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 Type

Select one of the options: FTP, FTPS or sFTP.

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

Result of the command service option used.

WATCH OUT!! If you want to keep the origional message, you kept in, for instance, msgprt0, use another msgpart name to catch the result of the selected command service.

If you do not change this msgprt and keep it the same as the MessgaePart-In, you will overwrite your previouse message.

For example if you use the mv function to backup the file you just picked up on a FTP Server. The picked up file will be in the msgprt0 for instance. If you now perform a move and do not change the MessagePart-out, you will lose your message.

Command

See table in documentation for an overview of possible commands. When selecting a specific option the form will change accordingly.

GET/MGET

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.

GET/MGET

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.

MV

Move-Target-Directory

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

MV

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.

MV

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.

MV

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.

GET/MGET/MV/RM

Remote-Filename

Specify a fixed name for the remote file.

GET/MGET/MV/RM

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.

GET/MGET

Remote-Filename-Pattern

Specify a pattern for the remote filename.

MGET

Remote-Filename-Regex

Specify a regular expression for the remote filename.

Strict Reply

Enable or disable Strict Reply Parsing. If true, it requires the 3 digit code be followed by space and some text. If false, only the 3 digit code is required.

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 Channel Connect Timeout in Milliseconds

Connect timeout in milliseconds.

SFTP Key Exchange

DEPRECATED! DO NOT USE!

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

SSH Security information

Please see the page SSH Security Information