SSIS FTP Task

The SSIS FTP Task is used to perform different kinds of operations on Files and Folders (or Directories). For instance, we can use this SSIS FTP Task if you want to send or receive the files from the FTP Server to a local directory.

The SSIS FTP Task uses the FTP Connection Manager to connect with the Remote (FTP Server) Files and Folders.

Before we start configuring the SSIS FTP Task, Let us see the files and folders available on our FTP Server. The below screenshot will show the same.

Folder

Configure SSIS FTP Task

First, Drag and drop the FTP Task into the Control Flow region and rename it as SSIS FTP Task.

SSIS FTP TASK 1

Double click on it will open the SSIS FTP Task Editor to configure it.

  • Name: Please provide the Unique Name
  • Description: Briefly describe the SSIS Task Functionality. It is always a good practice to provide a valid description.
SSIS FTP TASK 2

Within the SSIS FTP Task Connection section, We have one property called FTPConnection:

  • FTPConnection: By clicking on the drop-down arrow, show you the already created FTP Connections (If any). Or please click on the <New Connection..> option to create one. Let us see what happens when you click on the <New Connection..> option.
New Connection

Once you click on the <New Connection..> option, FTP Connection Manager will open to configure the connection settings. Please refer to the FTP Connection Manager article to understand the connection settings.

Connection Manager

StopOnFailure: This property holds two options: TRUE and FALSE.

  • If you set this property to TRUE, it will fail when there is an issue in the FTP operation.
  • When you set this property to FALSE, the SSIS FTP task will not fail, even if there is an issue in the FTP operation.
SSIS FTP TASK 5

Please click on the File Transfer tab to configure the FTP operations. The following screenshot shows the available properties in this tab. Within the Operation section, we have the IsTransferAscii option.

  • IsTransferAscii: This property has two options: True and False. If we set this property to true, the FTP task uses ASCII mode for its operations.
SSIS FTP TASK 6

The FTP task in SSIS supports eight different operations on Files and Folders. Please see the available options in the below screenshot.

SSIS FTP TASK 7

Operations

FTP OperationDescription
Send FilesIt will send files from the Local Computer to FTP Server. Please refer to the FTP Task Send Files article to send a single file and the FTP Task Send Multiple Files article to send multiple files.
Receive FilesIt imports files from the remote directory to the local computer. Please refer to the FTP Task Receive Files to receive a single file and the FTP Task Receive Multiple Files article to receive multiple files.
Create Local DirectoryUsing this option, we can create the local computer’s directory (or folder). Please refer to the FTP Task Create Local Directory article to Create Local Directory.
Create Remote DirectoryUsing this option, we can create the directory (or folder) in the FTP server. Please refer to the FTP Task Create Remote Directory to Create a remote Directory.
Remove Local DirectoryIt removes the directory (or folder) on the local computer. Please refer to the FTP Task Delete Local Directory to delete the Local Directory.
Remove Remote DirectoryUse this option to delete the directory in the remote FTP Server. Please refer to the Delete Remote Directory to delete the remote Directory.
Delete Local FilesIt will delete files on the local computer. Please refer to the Delete Local Files article to delete files from the local file system.
Delete Remote FilesIt deletes files on the FTP Server. Please refer to the Delete Remote Files article to delete files from the Server.

SSIS FTP Task Local Parameters

IsLocalPathVariable: This property has two options: True and False. If we set this property to true, the local path is stored in a variable. If this property is false, we must manually select the local path using File Connection Manager.

SSIS FTP TASK 8

When we set the IsLocalPathVariable to true, a new property called LocalVariable will appear.

LocalVariable: This property displays all the available user variables. Please select the appropriate variable holding the Local Path (File or Folder path). If you haven’t created any variable, please click the <New Variable..> shown in the screenshot below.

SSIS FTP TASK 9

Once you click on the <New Variable..>, a new window called Add Variable will open to create the new variable. Here, you can create a new variable, which will hold the local source path.

SSIS FTP TASK 10

When you set the IsLocalPathVariable to False, we have to configure the Source Connection using the LocalPath Property. If you have already created the File Connection Manager, you can select it from the drop-down list.

If you haven’t created any connection Manager before, You have to create one by selecting <New Connection..>.

Create Local Path New Connection

Once you select the <New Connection..> for files and folders, the File Connection Manager Editor will open in a new window. We have to configure the connection with files and folders using this editor.

Browse File 12

Once you have selected the required file, Click on the OK button

Configure SSIS FTP Task Remote Parameters

IsRemotePathVariable: This property has two options: True and False. If we set this property to true, we must access the Remote path from the variable. If we set this property to false, we must manually select the Remote path using FTP Connection Manager (which we created in our General Tab).

Is RemotePath Variable option

When we set the SSIS FTP Task IsRemotePathVariable to False, we must configure the remote Connection using RemotePath Property. Please click the browse (…) button beside this option to open the remote directory. From the below screenshot, you can observe the / as the location because it is the root directory of the FTP server. Currently, we don’t have any folders to select. So, we chose the root directory as the location to receive the file from the local computer.

SSIS FTP TASK 14

OverwriteDetination: This property has two options: True and False. If we set this property to true, the SSIS FTP Task overwrites the existing files in the Destination path.

SSIS FTP TASK 15

Click OK to finish configuring SSIS FTP Task Editor.