Search code examples
ssisftparchive

Download, Process, Archive Then Delete FTP Files SSIS


I have an SSIS package that needs to connect to an FTP server and only retrieve files that aren't already on my local machine (example below), process these files by inserting them into SQL server, archive the processed files, then delete (example below) only the processed files from the FTP server.

I have successfully done the ForEach Loop Container to insert the files into SQL and then archive them, but the two FTP tasks are not working.

Although I've searched for this, I'm not finding the specific FTP retrieve and delete, so if there is an article matching this, then please pass that on.

FTP Retrieve Example:

FTP Server: (file1.xml, file2.xml, file3.xml)<br>
Local Machine: (file1.xml)<br>
Need: (file2.xml, file3.xml)

FTP Delete Example:

FTP Server:(file1.xml, file2.xml, file3.xml, file4.xml)<br>
Processed:(file1.xml, file2.xml, file3.xml)<br>
Delete:(file1.xml, file2.xml, file3.xml)

Solution

  • i think you will find your answer in these below links:

    http://www.sqlservercentral.com/Forums/Topic577774-148-1.aspx

    http://www.cozyroc.com/script/get-ftp-file-list-task