In this article, we will show you the steps involved in configuring the SSIS FTP task to receive files with examples.
The below screenshot shows you the data inside the FTP Server. Our task is to Copy the Multicast.txt file present inside the Root directory to File System Folder inside E Drive.
The following screenshot shows you the folders inside the local drive.
SSIS FTP TASK RECEIVE 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 Files
Double click on it will open the FTP Task Editor to configure it. Please change the task name as you need and provide a valid description.
Within the Connection section, click on the FTPConnection drop-down arrow shows the existing FTP Connections (If any). Or please click on the <New Connection..> option. Here, We are using the already created Connection from SSIS FTP Connection Manager article
Please click on the File Transfer tab to configure the FTP operations. The following screenshot shows the available properties in this tab.
In this example we want to receive a file from FTP Server so, We are selecting the Receive Files option from the Operations property
For the time being, we are declaring the Remote path manually, but in real-time, use variables. Please click on the browse (…) button beside this option to open the remote directory.
From the below screenshot, you can see / as the location because it is the root directory of the FTP server, and currently, we don’t have any subfolders. Our task is to Copy the Multicast.txt file present inside the Root directory to File System Folder inside E Drive. So, we are selecting the MULTICAST.txt file.
Here, we declared the Local path manually, but in real-time, we recommend variables. If we set the IsLocalPathVariable to False, configure the Source Connection using LocalPath Property. If you already created the File Connection Manager, select it from the drop-down list. Otherwise, create it by selecting <New Connection..>.
Once you selected the <New Connection..> for files and folders, the File Connection Manager Editor will open. Using this editor, we have to configure the connection with the existing folder. To do so, please click on the Browse button to select the Existing Folder from the file system.
From the below screenshot, 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 this property to true, SSIS FTP Task overwrite the existing folder (if any) in the Destination path.
Click Ok to finish configuring the SSIS FTP task receive files package. Let’s run and see whether we successfully Copied the Multicast.txt file from the FTP Server to local the File System or Not.
Well, We successfully Copied the Multicast.txt file from the FTP Server to the File System Task – Copy files Folder.