Skip to main content
Version: 4.2.5

SFTP reader

Description

Polls an SFTP directory for files matching specified criteria. When a matching file is found on the server, it is downloaded either to a file or to memory.

An SFTP reader can function as an Entry Point or as an ordinary activity in an Adapterflow. The two have slightly different parameters. To view SFTP reader as an ordinary activity, see SFTP reader as activity below.

note

All server paths are absolute in the "/path/to/directory"-form.

Note that directory paths on server side may be case sensitive.

Impact on Adapterflow data stream: Yes

The content of the found file is written to the data stream. Previous data in the data stream is overwritten.

SFTP reader as entrypoint

In parameters

Activity 

NameTypeDescription
DescriptionStringValueDescription of the activity.
NameStringValueName of the activity. The name has to be unique in the Workflow. The name is used as identifier of the activity in activity binding.
Error on timeoutBoolValueSpecifies whether to generate an error when timeout occurs.
Bindable

Authentication

NameTypeDescription
PasswordPasswordValueSpecifies a password to enable password authentication.
Bindable
Private key fileFilePathValueFile containing client's private key. Specifies a key to enable public key authentication. Note that the file must be accessible at run time.
Bindable
Private key passwordPasswordValuePassword of the file containing the private key.
Bindable
Implicit interactive logonBoolValueTo be set to True when client needs to support interactive logon. The client will try to resolve server prompts for Username and Password. For more details, see SFTP - General information.
Bindable
Interactive logonNameValueListTo be used when client needs to support interactive logon but cannot implicitly resolve server prompts. Named values where each name/value pair is server prompt and client response.
For example username: 'User: ' and 'user001'. Use the Set value to list activity to create a list of named values and bind the InteractiveLogon property to its output. For more details, see SFTP - General information.
Bindable

Client side

NameTypeDescription
Save to discBoolValueSpecifies whether the found file is to be saved to directory specified in Local directory. True means files will be saved. Default: False
If set to True but Local directory is not specified, files will be saved in a temporary directory for large files.
Local directoryActivityComplexValue of DirectoryPathValueDirectory where found file will be downloaded.
Bindable
Local file nameActivityComplexValue of FilePathValueName that the downloaded file will get. If left empty, the file will keep its original name.
Bindable
Delete local fileBoolValueSpecifies whether the found file is to be deleted after the activity is finished. True means file will be deleted (default).

Connection

NameTypeDescription
ServerActivityComplexValue of StringValueName or IP address of SFTP server.
Bindable
PortIntegerValuePort that the server listens to for incoming connections. Default: 22
Bindable
Server validationSFTPServerValidationSpecifies how the server is validated. Turning validation off by selecting 'None' is not recommended.
The options are:
  • None
  • Public_key(default)
Bindable
Servers public key fileFilePathValueFile containing the public ssh key of the server. Used for validating the server. Note that the file must be accessible at run time.
Bindable
UserStringValueUser name to use log on to the SFTP server.
Bindable

Connection - advanced

NameTypeDescription
Socket timeoutIntegerValueThe socket timeout specifies, in milliseconds, the maximum time of inactivity after which socket operation is cancelled and is considered as expired. A value of 0 implies that operation will never expire.
Default: 0
Bindable
RetriesIntegerValueNumber of retries allowed before an error is raised.
Default: 0
Bindable
Time between retriesIntegerValueTime, in seconds, to wait between each retry.
Default: 0
Bindable
Download block sizeIntegerValueControls the size, in bytes, of the single request for data reading from the remote server.
Default: 0, which means "use optimal value". Optimal value is set to 2Mb - 256b.
Bindable
Auto adjust transfer blockBoolValueSpecifies whether the block sizes and pipeline length is adjusted for optimal performance. The default value is True, which means that block sizes and pipeline length are adjusted to an optimal value. Default: True.
Bindable
Pipeline lengthIntegerValueSpecifies the pipeline length, i.e. the number of concurrent read/write operations sent within a single download/upload. A high value will improve performance but will require more resources (memory). Default: 10.
Bindable
Force compressionBoolValueSpecifies whether to force compression. True means that the client will explicitly request compression. Default: False
Bindable
SFTP VersionsSFTPVersionsValueSpecifies the SFTP versions that can be used during the connection.
Default: 2,3,4,5,6
Bindable
Use UTF8BoolValueSpecifies whether the transfer should use UTF8 for parsing the filename.
Bindable
Initialize KEXBoolValueSet to True if you want the client to send KEX (key exchange) initialization to the server immediately after the connection is established. Doing so can solve issues with some SFTP servers that expect the client to initialize KEX.
Bindable

Connection - HTTP Proxy

NameTypeDescription
Use HTTP proxyBoolValueEnables to use SFTP with HTTP proxy.
Bindable
ServerActivityComplexValue of StringValueName or IP address of the SOCKS server.
Bindable
PortIntegerValuePort that the HTTP proxy server listens to for incoming connections.
Bindable
Authentication methodHttpProxyAuthenticationWhat authentication method should be used for the HTTP proxy connection.
  • No authentication
  • Basic authentication
  • Digest Authentication
  • NTLM authentication (Windows Integrated authentication)
Bindable
Enable authenticationBoolValueIf set to True, the socks connection will use authentication.
Default: False
Bindable
UsernameStringValueUsername for the HTTP proxy authentication.
Bindable
PasswordPasswordValuePassword for the HTTP proxy authentication.
Bindable

Connection - SOCKS

NameTypeDescription
Use SOCKSBoolValueEnables the use of SFTP with SOCKS. True means that communication will go through a SOCKS proxy.
Bindable
ServerActivityComplexValue of StringValueName or IP address of the SOCKS server.
Bindable
PortIntegerValuePort that the SOCKS server listens to for incoming connections.
Default: 1080
Bindable
VersionSocksVersionValueThe version of the SOCKS protocol. The options are:
  • Version 4
  • Version 5 (default)
Bindable
Use IPv6BoolValueIf set to True, SOCKS connection will use IPv6.
Default: False
Bindable
Resolve address on serverBoolValueIf set to True, the SOCKS server should try to resolve the hostname of the SFTP destination server.
Default: False
Bindable
Enable authenticationBoolValueIf set to True, the SOCKS connection will use authentication.
Default: False
Bindable
UsernameStringValueUsername for the SOCKS authentication.
Bindable
PasswordPasswordValuePassword for the SOCKS authentication.
Bindable

Server side

NameTypeDescription
Move file to directoryActivityComplexValue of SFTPDirectoryPathValueAbsolute path to directory where the file is to be moved before it is downloaded.
Note. The directory path may be case sensitive.
Bindable
Rename fileBoolValueSpecifies whether file on server is to be renamed before it is downloaded. True means file is to be renamed. Default: False
Delete server fileBoolValueSpecifies whether file is to be deleted on server after the activity has been successfully completed. True means file is to be deleted (default).

Standard

NameTypeDescription
Server directoryActivityComplexValue of SFTPDirectoryPathValueAbsolute path to server directory to be scanned, for example /path/to/orders
Note. The directory path may be case sensitive.
Bindable
Server filterActivityComplexValue of StringValueFilter sent to server, for example . or *.xml
Bindable
Server filter is case sensitiveBoolValueSpecifies whether server filter is to be case sensitive. True means filter is case sensitive.
Default: True
Bindable
Client filterActivityComplexValue of RegExpStringValueRegular expression applied as filter on files returned by server (case insensitive),
for example "\b[a-z0-9]+.txt"
Bindable
Scan intervalIntegerValueTime interval in seconds between file searches.
Default: 30
Bindable
Settle timeIntegerValueThe time in milliseconds that a file must have been untouched by any events before it can be processed.
Default: 0
Bindable
Transfer typeSFTPTransferTypeSpecifies how data is to be transferred. The options are:
  • ASCII
  • Binary (default)
Bindable
New event on each runBoolValueSpecifies whether to create a new event each time the Adapterflow is triggered.
Bindable

Out parameters 

NameTypeDescription
Local filepath OutFilePathValueThe full path to the file on the client.
Local filename OutFilePathValueThe name of the file on the client (no directory path).
Processing filepath OutFilePathValueThe full path and name of the file on the server after it was renamed and/or moved.
Processing filename OutFilePathValueThe name of the file on the server after it was renamed and/or moved (no directory path).
Original filepath OutFilePathValueThe full path and name of the file on the server before it was renamed and/or moved.
Original filename OutFilePathValueThe name of the file on the server before it was renamed and/or moved (no directory path).
Init parameters OutStringThe init parameters received from the creator of the event.
Run parameters OutStringThe run parameters received from the creator of the event.
Event parameters OutStringValueEvent parameters received from the creator of the event.
Event Node ID OutInt32Node id received from the creator of the event.

SFTP reader as activity

Activity 

NameTypeDescription
DescriptionStringValueDescription of the activity.
NameStringValueName of the activity. The name has to be unique in the Workflow. The name is used as identifier of the activity in activity binding.
Error on timeoutBoolValueSpecifies whether to generate an error when timeout occurs.
Bindable

Authentication

NameTypeDescription
PasswordPasswordValueSpecifies a password to enable password authentication.
Bindable
Private key fileFilePathValueFile containing client's private key. Specifies a key to enable public key authentication. Note that the file must be accessible at run time.
Bindable
Private key passwordPasswordValuePassword of the file containing the private key.
Bindable
Implicit interactive logonBoolValueTo be set to True when client needs to support interactive logon. The client will try to resolve server prompts for Username and Password. For more details, see SFTP - General information.
Bindable
Interactive logonNameValueListTo be used when client needs to support interactive logon but cannot implicitly resolve server prompts. Named values where each name/value pair is server prompt and client response.
For example username: 'User: ' and 'user001'. Use the Set value to list activity to create a list of named values and bind the InteractiveLogon property to its output. For more details, see SFTP - General information.
Bindable

Client side

NameTypeDescription
Save to discBoolValueSpecifies whether the found file is to be saved to directory specified in Local directory. True means files will be saved. Default: False
If set to True but Local directory is not specified, files will be saved in a temporary directory for large files.
Local directoryActivityComplexValue of DirectoryPathValueDirectory where found file will be downloaded.
Bindable
Local file nameActivityComplexValue of FilePathValueName that the downloaded file will get. If left empty, the file will keep its original name.
Bindable
Delete local fileBoolValueSpecifies whether the found file is to be deleted after the activity is finished. True means file will be deleted (default).

Connection

NameTypeDescription
ServerActivityComplexValue of StringValueName or IP address of SFTP server.
Bindable
PortIntegerValuePort that the server listens to for incoming connections. Default: 22
Bindable
Server validationSFTPServerValidationSpecifies how the server is validated. Turning validation off by selecting 'None' is not recommended.
The options are:
  • None
  • Public_key(default)
Bindable
Servers public key fileFilePathValueFile containing the public ssh key of the server. Used for validating the server. Note that the file must be accessible at run time.
Bindable
UserStringValueUser name to use log on to the SFTP server.
Bindable

Connection - advanced

NameTypeDescription
Socket timeoutIntegerValueThe socket timeout specifies, in milliseconds, the maximum time of inactivity after which socket operation is cancelled and is considered as expired. A value of 0 implies that operation will never expire.
Default: 0
Bindable
RetriesIntegerValueNumber of retries allowed before an error is raised.
Default: 0
Bindable
Time between retriesIntegerValueTime, in seconds, to wait between each retry.
Default: 0
Bindable
Download block sizeIntegerValueControls the size, in bytes, of the single request for data reading from the remote server.
Default: 0, which means "use optimal value". Optimal value is set to 2Mb - 256b.
Bindable
Auto adjust transfer blockBoolValueSpecifies whether the block sizes and pipeline length is adjusted for optimal performance. The default value is True, which means that block sizes and pipeline length are adjusted to an optimal value. Default: True.
Bindable
Pipeline lengthIntegerValueSpecifies the pipeline length, i.e. the number of concurrent read/write operations sent within a single download/upload. A high value will improve performance but will require more resources (memory). Default: 10.
Bindable
Force compressionBoolValueSpecifies whether to force compression. True means that the client will explicitly request compression. Default: False
Bindable
SFTP VersionsSFTPVersionsValueSpecifies the SFTP versions that can be used during the connection.
Default: 2,3,4,5,6
Bindable
Use UTF8BoolValueSpecifies whether the transfer should use UTF8 for parsing the filename.
Bindable
Initialize KEXBoolValueSet to True if you want the client to send KEX (key exchange) initialization to the server immediately after the connection is established. Doing so can solve issues with some SFTP servers that expect the client to initialize KEX.
Bindable

Connection - HTTP Proxy

NameTypeDescription
Use HTTP proxyBoolValueEnables to use SFTP with HTTP proxy.
Bindable
ServerActivityComplexValue of StringValueName or IP address of the SOCKS server.
Bindable
PortIntegerValuePort that the HTTP proxy server listens to for incoming connections.
Bindable
Authentication methodHttpProxyAuthenticationWhat authentication method should be used for the HTTP proxy connection.
  • No authentication
  • Basic authentication
  • Digest Authentication
  • NTLM authentication (Windows Integrated authentication)
Bindable
Enable authenticationBoolValueIf set to True, the socks connection will use authentication.
Default: False
Bindable
UsernameStringValueUsername for the HTTP proxy authentication.
Bindable
PasswordPasswordValuePassword for the HTTP proxy authentication.
Bindable

Connection - SOCKS

NameTypeDescription
Use SOCKSBoolValueEnables the use of SFTP with SOCKS. True means that communication will go through a SOCKS proxy.
Bindable
ServerActivityComplexValue of StringValueName or IP address of the SOCKS server.
Bindable
PortIntegerValuePort that the SOCKS server listens to for incoming connections.
Default: 1080
Bindable
VersionSocksVersionValueThe version of the SOCKS protocol. The options are:
  • Version 4
  • Version 5 (default)
Bindable
Use IPv6BoolValueIf set to True, SOCKS connection will use IPv6.
Default: False
Bindable
Resolve address on serverBoolValueIf set to True, the SOCKS server should try to resolve the hostname of the SFTP destination server.
Default: False
Bindable
Enable authenticationBoolValueIf set to True, the SOCKS connection will use authentication.
Default: False
Bindable
UsernameStringValueUsername for the SOCKS authentication.
Bindable
PasswordPasswordValuePassword for the SOCKS authentication.
Bindable

Server side

NameTypeDescription
Move file to directoryActivityComplexValue of SFTPDirectoryPathValueAbsolute path to directory where the file is to be moved before it is downloaded.
Note. The directory path may be case sensitive.
Bindable
Rename fileBoolValueSpecifies whether file on server is to be renamed before it is downloaded. True means file is to be renamed. Default: False
Delete server fileBoolValueSpecifies whether file is to be deleted on server after the activity has been successfully completed. True means file is to be deleted (default).

Standard

NameTypeDescription
Server directoryActivityComplexValue of SFTPDirectoryPathValueAbsolute path to server directory to be scanned, for example /path/to/orders
Note. The directory path may be case sensitive.
Bindable
Server filterActivityComplexValue of StringValueFilter sent to server, for example . or *.xml
Bindable
Server filter is case sensitiveBoolValueSpecifies whether server filter is to be case sensitive. True means filter is case sensitive.
Default: True
Bindable
Client filterActivityComplexValue of RegExpStringValueRegular expression applied as filter on files returned by server (case insensitive),
for example "\b[a-z0-9]+.txt"
Bindable
Scan intervalIntegerValueTime interval in seconds between file searches.
Default: 30
Bindable
Settle timeIntegerValueThe time in milliseconds that a file must have been untouched by any events before it can be processed.
Default: 0
Bindable
Transfer typeSFTPTransferTypeSpecifies how data is to be transferred. The options are:
  • ASCII
  • Binary (default)
Bindable
TimeoutTimeSpanTimeout for the operation. Format: HH:MM:SS.
Bindable
Suppress additional operationsBoolValueSet to True to suppress any additional file operations, which lets you overcome problems which may occur with some SFTP servers. True means all operations except downloading a file are discarded.

When set to True, and Transfer type is Binary, the properties Pipeline length is set to 1 and Auto adjust transfer block is set to false during the read operation. Values are reset after operation.
Bindable

Out parameters 

NameTypeDescription
Local filepath OutFilePathValueThe full path to the file on the client.
Local filename OutFilePathValueThe name of the file on the client (no directory path).
Processing filepath OutFilePathValueThe full path and name of the file on the server after it was renamed and/or moved.
Processing filename OutFilePathValueThe name of the file on the server after it was renamed and/or moved (no directory path).
Original filepath OutFilePathValueThe full path and name of the file on the server before it was renamed and/or moved.
Original filename OutFilePathValueThe name of the file on the server before it was renamed and/or moved (no directory path).

See Also

SFTP - General information

SFTP writer