Procedure
- Launch Talend Studio and create an empty Job.
- Drop a tSystem component from the Palette to the design workspace.
-
Double-click tSystem to open its Basic
settings view and do the following.
-
Select Use Array Command.
The Command table appears.
- Add a row in the Command table by clicking the plus button on the bottom of the table.
- Type "cmd" in the row.
- Add four more rows in the table in the same way and type "/c", "copy", "d:\\customers.txt", and "d:\\temp\\customers.txt" in the rows.
This command copies d:\customers.txt to d:\temp.Note:- Because the tSystem component runs without a command shell, you need to create a command interpreter first before executing a command. You can create a command interpreter by typing "cmd" and "/c" (for Microsoft Windows) or "/bin/bash" and "-c" (for Linux) in the first two rows, as shown in the following screenshot.
- Put each of the command parameter in an individual row in the Command table.
-
Select Use Array Command.
- Select the to console from the Standard Output drop-down list.
- Leave the other options as they are.
- Press F6 to run this Job.
Results
The console prompts that a file is copied, indicating that the command is executed successfully.