Client Documentation
3.4. Advanced configuration¶
The current section describe advance configuration options.
3.4.1. Triger external command execution¶
3.4.1.1. preprocess¶
Optional: | Yes |
---|---|
Default value: | None |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Command to run locally before starting a transfer. If the preprocess command fails, the transfer is skipped until the preprocess command returns with exit code 0.
|
3.4.1.2. postprocess¶
Optional: | Yes |
---|---|
Default value: | None |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Command to run locally at the end of the transfer. This command is executed at the end of each transfer after ‘postprocesssuccess’ and ‘postprocessfail’. It will get executed when the transfer fails, it succeeds or no files are transferred. If the command contains the string ‘%file%’, it will be ignored. It will not be called for command type transfers. |
3.4.1.3. postprocesssuccess¶
Optional: | Yes |
---|---|
Default value: | None |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Command to run locally after a file was successfully transferred. It will not be called for command type transfers. If the command contains the string ‘%file%’, it will be replaced with the full path of the local file which is transferred. If the inbox contains multiple files, it will be called separately for each file.
|
3.4.1.4. postprocessfail¶
Optional: | Yes |
---|---|
Default value: | None |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Command to run locally if a file transfer fails after retrying for a number of times defined by ‘maxtry’. It will not be called for command type transfers. If the command contains the string ‘%file%’, it will be replaced with the full path of the local file which was transferred.
|
3.4.1.5. runbeforetransfer & runaftertransfer¶
Optional: | Yes |
---|---|
Default value: | None |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Run a SFTP or FTP command on the remote server before or after a file is transferred. Multiple commands can be specified by separating them with ‘;’. Since the runaftertransfer executes commands on the remote server, the set of accepted commands as well as command syntax is dictated by the remote server capabilities. The runaftertransfer uses raw SFTP or FTP commands and the syntax varies between SFTP and FTP. For example to rename or move a file on the remote server you will have to use the following runaftertransfer, according to the protocol used for the transfer:
Here is a list of common raw FTP commands accepted by most FTP servers: http://www.nsftools.com/tips/RawFTP.htm SFTP commands are described at the following URL: http://tinyurl.com/SFTP-commands SFTP commands support the * wildcard and wildcard expansion is done in case sensitive mode. Even when client or server is on a Windows machine. If executing a command fails, the whole transfer will fail. |
3.4.2. Archive transfered files and transfer activity log¶
SFTPPlus Client can be configured to store all transfered files or log for transfer activity into an archive folder.
This can be use to audit past activity or transfered files.
3.4.2.1. archive¶
Optional: | Yes |
---|---|
Default value: | ‘y’ |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Archive successfully transferred files. |
3.4.2.2. archiveprocessfiles¶
Optional: | Yes |
---|---|
Default value: | ‘y’ |
Values: |
|
From version: | 1.5.1 |
To version: | None |
Description: | Archive process files: .bat, .result, .sftp, initiate. |
3.4.2.3. keeponfail¶
Optional: | Yes |
---|---|
Default value: | ‘y’ |
Values: |
|
From version: | 1.5.1.rc20 |
To version: | None |
Description: | Indicates whether a file should be moved into failed archive folder if the transfer fails. |