The command task is used to execute shell scripts or standalone shell commands. You can define one or more commands or scripts in a command task. If you define multiple command or scripts in the same command task, the task executes the commands in a sequence.
You can define Unix/Perl commands for Unix servers or DOS commands for Windows servers. If your Informatica server is installed on a Unix operating system, you will be able to execute Unix commands. If the Informatica server is installed on Windows, you can use DOS commands.
To create a command task in Workflow Manager or Task Developer, perform the following steps:
cmd_TASK_NAME
. For our reference, we are using the command task name as cmd_COPY_FILE
. Click on Create, and then click on Done.The task appears in Workflow Manager or Task Developer. Use the link task to connect the start task to the command task.
Add a new command by clicking on the Add a new Command option, as shown in the preceding screenshot. In the Name column, enter the name of the command. For our reference, we are using COPY_FILE
as the command name.
A sample Windows command is indicated in the following screenshot: