Skip to content

SFTPHandler function

This function is used to handle different operations request like download, upload, watch and create directory from Sftp Server.

Firstly you will have to create the connection with SFTP server.

SFTPHANDLER (Create connection)

Create connection command is used to start the connection with SFTP server.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select SFTPHANDLER function. Select cmd as createConnection, provide ServerIP, Port, UserName and Password.

If the connection is successful, it will return true else it will return false in a variable defined in Element Key.

Tabular view :

Card view :

SFTPHANDLER (Download)

Download command is used to download files from SFTP server.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select SFTPHANDLER function. Select cmd as download, provide remotePath and localPath.

SFTPHANDLER (Upload)

Upload command is used to upload files on SFTP server.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select SFTPHANDLER function. Select cmd as upload, provide remotePath and localPath.

SFTPHANDLER (Watch)

Watch command is used to watch a file of particular extension in a folder.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select SFTPHANDLER function. Select cmd as watch, provide remotePath, extension, prefix, timeout, orderBy, dateTime and sortBy.

Here, remotePath and extension are mandatory fields. This command will return the path of the file found by the specified extension in a variable defined in Element Key.

 

SFTPHANDLER (Create Directory)

Create Directory command is used to create a directory on SFTP server.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select SFTPHANDLER function. Select cmd as createDirectory and provide directoryPath.

SFTPHANDLER (Close connection)

Close connection command is used to close the connection with SFTP server.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select SFTPHANDLER function. Select cmd as closeConnection.

 

Back To Top