Hello,
I m having an FTP Task in SSIS project, from where I have downloaded .csv file.
And also having a Processed Folder in which the processed .csv files are kept.
Main task is to download file from FTP and check , if the date of downloaded file is newer than file in processed folder, then only process that file. Else skip the processing
Can anyone help me out how to process about.
plz reply as early as possible.
Thanks & Kind regards ....
Aparna
I do not know if this is the best way to do this, but I would personally use the Foreach Loop container and the Script task. Loop over the folder into which the FTP task is dropping files, storing the file name in a package variable.
Then, inside a Script task contained within the Foreach Loop, use the System.IO.File class to compare the files retrieved by the FTP task with the matching files in the processed folder. Based on the comparison, set a package variable flag ("Newer"/"Older" or true/false or the like) in your script.
Then, back in your package's control flow, edit the properties of your precedence constraint(s) to execute the later tasks only if the flag variable is set to the correct value.
Does this help?
sql
No comments:
Post a Comment