SSIS Package step FTP

  • I have a step that ftp out to a location to grab a file. each month the file name changes, is there a way to filter or have the ftp step pick up the file.

    Currently this is the file name 56730_LAF_Layout.xlsx. The only part the changes each month is the first 5 numbers. I tried *_LAF_Layout.xlsx but didnt work does anyone have a suggestions on this?

    Thanks in advance

  • Create a variable and set the variable to evalueate as expression = True.

    Create an expression that creates the file name as you require.

    In the file transfer section of your ftp task, set the IsLocalPathVariable = True, and then select the variable you set up above.

    Or remote path, whatever the case may be.

    This link will show you how to do everything, Pick out the pieces you need.

    http://zlika.org/index.php/2010/06/06/simple-ssis-project-part-1/[/url]

  • Thanks my first step is picking upi the file using the FTP task thats my issue the name changes monthly.

    Then I have a few steps importing into the db and then exporting out then FTP out.

    My issue is grabbing the file each month

  • Ya, this is a fairly common issue.

    FTP Task only knows how to process 1 file, and 1 file only the *_Filename.xls your trying won't work.

    You need to create a variable to hold the name of the file. Since the file changes and it is dynamic you have to store the name in the variable.

    Then configure the ftp task to get the name of the file from the variable.

    On your ftp task make sure to set the Delay Validation to True.

    The only step left will be to figure out how to populate the variable with the correct name of the file.

    Do you know what the first 5 characters of the file name will be each month?

    Will there be 1 or many files each month?

  • There is only 1 file. The first 5 numbers change we never know what they will be from the client. I did try the *_laf.layout.xlsx but couldnt find it.

  • Ok, so create the variable.

    Then Configure your ftp task to get the name of the file from the variable.

    Create a script task that goes out to the drive and looks for the *_Layout...xlsx file.

    then once it finds it, gets the file name and updates the variable with the name.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply