In this article, we will show you the steps involved in configuring the SSIS FTP task to receive multiple files with examples. Please refer to the FTP Task Receive Files to understand the configuration settings involved in receiving a single file from FTP Server to the local file system.
The below screenshot shows the data inside the FTP Server. Our task is to Copy all the files (.txt, .xls, .jpg) present inside the Root directory to File System Folder inside E Drive.
The following screenshot shows you the folders inside the local directory.
SSIS FTP Task Receive Multiple Files
To receive files from FTP Server to the local computer, First Drag and drop the FTP Task into the Control Flow region and rename it as SSIS FTP Task Receive Multiple Files
Double click on it will open the FTP Task Editor to configure it. Please change the task name and description.
Within the Connection section, click on the drop-down arrow beside the FTPConnection shows the previously created FTP Connections (If any). Or click on the <New Connection..> option to create one. In this example, We are using the already created Connection from FTP Connection Manager article
Please click on the File Transfer tab to configure the FTP operations. The following screenshot shows the properties in this tab.
The SSIS FTP task supports eight different operations on Files and Folders. In this example, we want to receive multiple files from FTP Server. So, We are selecting the Receive Files option from the Operations property
If you’re going to choose a single file manually, please click on the browse (…) button beside this option to open the remote directory. In this example, we want to send all files (irrespective of extensions) from the FTP server to the local file system. So we are using Wildcard.
TIP: If you want to send only text files then use: /*.txt
Here, we are declaring the Local path manually, but in real-time, use variables. If we set the IsLocalPathVariable to False, configure the Source Connection using LocalPath Property. If you previously created the File Connection Manager, select it from the drop-down list. Otherwise, create one by selecting <New Connection..>.
Once you chose the <New Connection..>, File Connection Manager Editor will open in a new window. Using this editor, we have to configure the connection with the existing folder. To do so, click on the Browse button and select the Existing Folder from the file system.
From the below image, you can observe that we selected the FILE SYSTEM TASK – COPY FILES Folder as the local folder path. Click the Ok button to select it.
OverwriteDetination: If we set the property to true, SSIS FTP Task overwrite the existing files in the Destination path.
Click Ok to finish configuring the SSIS FTP task receive multiple files package. Let’s run and see whether we successfully Copied the files from the FTP Server to local the File System or Not.
Well, We successfully Copied all files from the FTP Server to the File System Task – Copy files Folder.