﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Integration Services  / FTP Task to import files based on last processed file variable / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 23:58:59 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: FTP Task to import files based on last processed file variable</title><link>http://www.sqlservercentral.com/Forums/Topic866712-148-1.aspx</link><description>yes I process the files and move it to an archive directory once I get the files in my working directory and process them.The problem was with i should be ftping into my working directory ( i cannot move files from FTP I am allowed to copy only). On a given day there are allways files from 1- 3000 files (no particular order of file names and are very huge sometimes) and if i have processed 1-50 files i did not want to copy files from 1-3000 all i want is 51-3000.Any body who might run into this problem. Here is what I have done. There may be better ways of doing this and I would like to hear others suggestions.I got a directory listing of ftp through a script task. similar to dir command in FTP (say it listed 1-150 files at a given instance).I Saved the filenames in an array and imported into a table. I matched with what I have already processed and looped through only unprocessed files for the next run and copied the files(51-150).</description><pubDate>Wed, 17 Feb 2010 23:19:09 GMT</pubDate><dc:creator>Aparna-1</dc:creator></item><item><title>RE: FTP Task to import files based on last processed file variable</title><link>http://www.sqlservercentral.com/Forums/Topic866712-148-1.aspx</link><description>It is common practice to move a file to an archive folder of some sort after processing it - perhaps adding 'processed date' to the file name in the process.If you adopt this process, your requirement changes to become: process and move all available files. A FOREACH container will help you do this quite easily.</description><pubDate>Wed, 17 Feb 2010 00:34:29 GMT</pubDate><dc:creator>Phil Parkin</dc:creator></item><item><title>FTP Task to import files based on last processed file variable</title><link>http://www.sqlservercentral.com/Forums/Topic866712-148-1.aspx</link><description>Hi All,I have to import files into adatabase from the data provider through FTP. Each day the vendor provides 3,000 files which I need to import. The idea is the package will run every 30 minutes and I should grab files greater than last processed id during each runex:20100217 is the folder which contains upto 3000 filesex 1.txt, 2.txt, 3.txt, 4.txtif in my previous run i have processed files 1,2,3 I should copy files only from 4.txt.I see that the FTP Task has the option to define remote path as variable but how can i achieve the &amp;gt;lastprocessed optionmay be i can save the ftp variable as/20100217/*.txt but it will fetch all the files and each time i do not want to get 3000 files and then discard already processed ones. Is there an efficient way of doing this.If FTP task has limitations then probably i will have to write a batch file that might do the same and I have to explore the possibilitiesYour help in this regard is appreciated.</description><pubDate>Tue, 16 Feb 2010 21:13:24 GMT</pubDate><dc:creator>Aparna-1</dc:creator></item></channel></rss>