FTP ActivityThis activity allows you to automate the actions that can be performed on FTP or SFTP site like upload, download, rename or delete the required file.
Prerequisites
Using FTP ActivityThe FTP Activity supports following operations: · Push- uploades the file in the FTP or SFTP site. · Pull- downloads the file from the FTP or SFTP site. · List Directory- lists all the files and folders available at the FTP or SFTP site location in an excel file. · Delete- deletes the files from the the FTP or SFTP site. · Rename- renames the files present in the FTP or SFTP site
Push1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities. 2. Drag the Application activity and drop on to the Flowchart designer on the Canvas. 3. In the Application Type list, select FTPApps. 4. In the Select An Application list, select the configured FTP server.
5. Double click the Application activity, drag the FTP Activity and drop inside the Application activity. 6. In the Operation Type list, select Push.
7. In the Source File Path list, select the parameter containing the path of the file to be uploaded ( along with the file name, for example- "D:\Data\PDFOutput.pdf"). You must pre-define the parameter with the file path to make it appear for the selection. 8. In the Destination Folder Path list, select the parameter containing the path of the FTP or SFTP site location where you want to upload the file, for example- "\Output"). You must pre-define the parameter with the folder path to make it appear for the selection. 9. In the Communication Mode list, select Active or Passive depending on how the data connection is established between the client and the server. 10. In the Transfer Mode list, select Binary or ASCII (Text) depending on the file type to be transferred. You can not transfer images file type using ASCII (Text) mode. 11. Click Result Mapping link, the Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the upload is successful, it returns true and if the operations fails it returns false. It can be used as an input for the next action that you want to perform depending upon the success or failure of the operation.
The file gets uploaded in the FTP folder once you run the process. You can test run the process post setting up the environment to verify if the file is uploaded to the required FTP or SFTP site location. Pull1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities. 2. Drag the Application activity and drop on to the Flowchart designer on the Canvas.
3. Double click the Application activity, drag the FTP Activity and drop inside the Application activity. 4. In the Operation Type list, select Pull.
5. In the Source File Path list, select the parameter containing the path of the file to be downloaded from the FTP or the SFTP site loaction for example-" \Output\PDFOutput.pdf" (if document is present at the root location itself, mention only the file name like "\PDFOutput.pdf").
6. In the Destination Folder Path list, select the parameter containing the path of the folder where you want to save the downloaded file, for example- "D:\Data\"). You must define the parameter in the Parameter bar with the folder path to let it appear for the selection. 7. In the Communication Mode list, select Active or Passive depending on how the data connection is established between the client and the server. 8. In the Transfer Mode list, select Binary or ASCII (Text) depending on the file type to be transferred. You can not transfer images file type using ASCII (Text) mode. 9. Click Result Mapping link, Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must define the parameter in the Parameter bar to let it appear for the selection. If the download is successful, it returns true and if the operations fails it returns false. It can be used as an input for the next action that you want to perform depending upon the success or failure of the operation.
The file gets downloaded from the FTP folder once you run the process. You can test run the process post setting up the environment to verify if the file is downloaded from the required FTP or SFTP site location.
List DirectoryThe list of files and folders is saved inside the excel file that gets created while performing this operation. If an excel file is already present at the location with same name, this operations overrides the file.
1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities. 2. Drag the Application activity and drop on to the Flowchart designer on the Canvas.
3. Double click the Application activity, drag the FTP Activity and drop inside the Application activity. 4. In the Operation Type list, select List Directory.
5. In the Ftp Directory Path list, select the parameter containing the FTP or SFTP directory path from where you want to list the files. , for example- "\FTP\". You must pre-define the parameter with the directory path to make it appear for the selection. 6. In the Excel output path list, select the parameter containing the path of the excel file (along with the file name, for example- "D:\DataTransfer\ExcelOutput.xlsx"). You must define the parameter in the Parameter bar to let it appear for the selection. 7. In the Output Result list, select the parameter where the output of the sorted file list is saved. 8. In the Sort by list, select the criteria based on which you want to sort the files. Available options are- Name, DateModified, Size and Type. 9. In the Sort Type list, select the order by which you to apply the sorting criteria. Available options are- ASC and DESC. ASC signifies ascending order while DESC signifies descending order. 10. In the Communication Mode list, select Active or Passive depending on how the data connection is established between the client and the server. 11. In the Transfer Mode list, select Binary or ASCII (Text) depending on the content of the file to be transferred. You can not transfer images file type using ASCII (Text) mode. 12. Click Result Mapping link, Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must define the parameter in the Parameter bar to let it appear for the selection. If the operation is successful, it returns true and if the operations fails it returns false. It can be used as an input for the next action that you want to perform depending upon the success or failure of the operation.
Once you run the process, the list of files is available in the mentioned excel file. You can test run the process post setting up the environment to verify if the list of files and folders is available.
Delete1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities. 2. Drag the Application activity and drop on to the Flowchart designer on the Canvas.
3. Double click the Application activity, drag the FTP Activity and drop inside the Application activity. 4. In the Operation Type list, select Delete.
5. In the Delete File Path list, select the parameter containing the path of the file to be deleted from the FTP or SFTP site location ( along with the file name, for example- "\Output\PDFOutput.pdf" (if document is present at the root location itself, mention only the file name like "\PDFOutput.pdf"). YYou must define the parameter in the Parameter bar to let it appear for the selection. 6. In the Communication Mode list, select Active or Passive depending on how the data connection is established between the client and the server. 7. In the Transfer Mode list, select Binary or ASCII (Text) depending on the file type to be transferred. You can not transfer images file type using ASCII (Text) mode. 8. Click Result Mapping link, Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must define the parameter in the Parameter bar to let it appear for the selection. If the rename is successful, it returns true and if the operations fails it returns false. It can be used as an input for the next action that you want to perform depending upon the success or failure of the operation.
The file gets deleted from the FTP folder once you run the process. You can test run the process post setting up the environment to verify if the file is deleted from the specified location. Rename1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities. 2. Drag the Application activity and drop on to the Flowchart designer on the Canvas.
3. Double click the Application activity, drag the FTP Activity and drop inside the Application activity. 4. In the Operation Type list, select Rename.
5. In the Ftp Directory Path list, select the parameter containing the path of the file to be renamed in the FTP folder( along with the file name, for example- " \Output\PDFOutput.pdf"). You must pre-define the parameter with the file path to make it appear for the selection. 6. In the Rename to list, select the parameter containing the name with which you want to rename the file. You must pre-define the parameter with the new name to make it appear for the selection. 7. In the Communication Mode list, select Active or Passive depending on how the data connection is established between the client and the server. 8. In the Transfer Mode list, select Binary or ASCII (Text) depending on the file type to be transferred. You can not transfer images file type using ASCII (Text) mode. 9. Click Result Mapping link, Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must define the parameter in the Parameter bar to let it appear for the selection. If the delete is successful, it returns true and if the operations fails it returns false. It can be used as an input for the next action that you want to perform depending upon the success or failure of the operation.
The file gets renamed in the FTP folder once you run the process. You can test run the process post setting up the environment to verify if the file is renamed at the specified location. FTP Activity PropertiesThe properties of a FTP Activity are listed in the following table and can be edited in the Properties grid on the right panel.
|
On This Page Hide
Related Topics |