Skip to main content Skip to complementary content

Listing all files/folders on the FTP root directory

Configure the tFTPFileList component, the tIterateToFlow component, and the tLogRow component to iterate all files and folders on the FTP root directory and display the names and paths of these files and folders on the console of Talend Studio .


  1. Double-click the tFTPFileList component to open its Basic settings view.
  2. Specify the connection details required to access the FTP server. In this example, select the Use an existing connection check box and from the Component list drop-down list displayed, select the connection component to reuse its connection details you have already defined.
  3. In the Remote directory field, specify the FTP server directory on which the files and folders will be iterated. In this example, it is /, which means the root directory of the FTP server.
  4. Double-click the tIterateToFlow component to open its Basic settings view.
  5. Click the button next to Edit schema to open the schema dialog box.
  6. Click the button to add two String type columns filename and filepath that will hold the names and paths of the files to be iterated respectively. When done, click OK to close the dialog box.
  7. In the Mapping table, set the values for the filename and filepath columns. In this example, the global variable ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")) for filename and the global variable ((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")) for filepath.

    Note that you can fill the values by pressing Ctrl + Space to access the global variables list and then selecting tFTPFileList_1_CURRENT_FILE and tFTPFileList_1_CURRENT_FILEPATH from the list.

  8. Double-click the tLogRow component to open its Basic settings view, and then select Table (print values in cells of a table) in the Mode area for better readability of the result.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!