Procedure - 7.3

tFileCopy

EnrichVersion
Cloud
7.3
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
EnrichPlatform
Talend Studio
task
Data Governance > Third-party systems > File components (Integration) > File management components > tFileCopy
Data Quality and Preparation > Third-party systems > File components (Integration) > File management components > tFileCopy
Design and Development > Third-party systems > File components (Integration) > File management components > tFileCopy

Procedure

  1. Create a new Job and add a tFileList component and a tFileCopy component by typing their names in the design workspace or dropping them from the Palette.
  2. Connect tFileList to tFileCopy using a Row > Iterate link.
  3. Double-click tFileList to open its Basic settings view.
  4. In the Directory field, browse to or type in the directory (D:/Input in this example) to iterate upon.
  5. Double-click tFileCopy to open its Basic settings view.
  6. In the File Name field, press Ctrl+Space to access the global variable list and select the tFileList_1.CURRENT_FILEPATH variable from the list to fill the field with ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).
  7. Set the destination directory by browsing to the directory or type in the path to the directory in the Destination directory field.
  8. Perform one of the following operations.
    • To move the files, select the Remove source file check box, leave other options as they are.
    • To copy the files, make sure the Remove source file check box is not selected, leave other options as they are.
    • To rename the files, make sure the destination directory is the current directory of the files, select the Rename option, type in the new filenames for the files in the Destination filename field, and then select the Remove source file option. The example given in the following figure renames the files by prefixing the filenames with the string renamed_.
  9. Press Ctrl+S to save your Job and press F6 to execute it.
    You can check the files moved or copied in the destination directory or check the renamed files in the source directory.