- 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.
- Connect tFileList to tFileCopy using a Row > Iterate link.
Double-click tFileList to open its Basic settings view.
- In the Directory field, browse to or type in the directory to iterated upon.
Double-click tFileCopy to open its Basic settings view.
- 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")).
- In the Destination directory field, browse to or type in the directory to copy each file to.
- Select the Remove source file check box to get rid of the files that have been copied.
Press Ctrl+S to save your Job and press
F6 to execute it.
All the files in the defined source directory are copied to the destination directory and are removed from the source directory.