Tuesday, 25 April 2017

Receiving (Downloading) multiple files through FTP

The FTP Task gives us the ability to send files from a local system to a remote host or retrieve them from a remote host to a local system. For example a company may export all its data into some CSV files, text files or other type of the files and they put them on an FTP address, and another company or other processes may need to get those files from FTP. The FTP Task also provides a way to work with multiple files.
Read FTP task : Click here

Receiving (Downloading) Multiple files from FTP server

The FTP Task is for the transfer of files through FTP from local to remote or the reverse. To work with the FTP Task, we first need to create an FTP connection manager. When creating the FTP connection manager, server name and port can be defined. Credentials for connections to the FTP Server are also configurable.
Microsoft provide the free FTP server: ftp.microsoft.com
 We can find some free FTP server for testing purpose.

For this sample we used test.rebex.net.
Here I am creating FTP connection
 

Clicking on the Test Connection
 

Connection established successfully.


Options on the connection Manager
The FTP connection timeout can be defined. The default value is 60 seconds. Operations in the File Transfer tab define what operation should be done in the FTP Task.


Use Passive Mode:
There is an option in FTP Connection Manager to choose between Passive or Active mode for connection type. In the Active mode, the server initiates the connection, but in Passive mode the client initiates the connection. By default, FTP Connections are in Active mode.
File Transfer:
  

Here I am creating the local path
 

Now I am creating the Remote connection.
 

Suppose if we select the one file then we can download one file .If we want to download specific file format we need to give folder and the .extension. See the example
 
We can download all text files. Here I am downloading all .png files.
 
Now I am executing the package.
 
Executing package.
 
Package executed successfully. See the output.
 
Suppose we want to download the all file from the folder we need to give the Remote path as below.
 
Now I am executing the package
 
See the result.





Popular Posts