Skip to main content Skip to complementary content

Procedure

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.

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 – please let us know!