I have an FTP server with a folder named CIV.2-130211067212254633. Inside this folder, there are files with names like 066075254035232083135067074114053142221015071213.Upload. 066075254035232083135067074114053142221015071214.Upload. 066075254035232083135067074114053142221015071215.Upload. The names of these files are stored in a SQL Server database table named tblsample under the column FtpFiles. What I want to achieve:

Retrieve the file names from the FtpFiles column in the tblsample table. Download the corresponding files from the FTP server to my local server. The downloaded files should be placed in a local directory with the same name as the CIV.2-130211067212254633 folder, followed by the file name. My Tools:

I'm using SSIS and have set up an FTP connection manager. I'm aware of the FTP Task and the Foreach Loop Container, but I'm unsure about how to proceed. My Questions:

How can I retrieve the file names from the database table and loop through them using the Foreach Loop Container in SSIS? How can I dynamically generate the local download path for each file by combining the CIV.2-130211067212254633 folder name with the file name? What expressions or settings should I use in the FTP Task and Foreach Loop Container to make this process work without using a Script Task? I would greatly appreciate any step-by-step instructions or examples that could help me achieve this task within SSIS. Thank you so much for your time and assistance!

Feel free to modify this question according to your needs and add any specific details you think are important. Good luck with getting help on Stack Exchange!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.