Recieve Dated file from FTP and load it in the DB

  • Hi - I am able to recieve a specific file from FTP site using FTP Task with constant remote path. But there will be a new dated file on the FTP site everyday, and I am not able to use RemoteVariablePath to recieve this file.

    I set the "RemotePathVariable=True" in the FTP Task Editor/File Transfer tab, and selected my "RemotePathVariable" that I created as Remote Path.

    How do I assign the Remote Path "\FromFolder\FileName_yyyymmdd.txt.pgp" to this variable I created?

    Any help would be greatly appreciated.

    Thanks,

    - Manish

  • I'd be interested to hear a good acnswer to this one. The only thing I can think of is a .Net Script component that takes in the path as a ReadWriteVariable, and does the trimming in the .Net script.

    hth

  • Expressions will more than likely be your friend here. I've seen a couple of posts on some blog sites that talk about using expressions to get dates, but that's definitely unwieldy. For ease/quick start, I'd probably set up an Exec SQL Task that just did something like "SELECT CONVERT(char(10), getdate(), 112) as CurrentDate" and assign the output of that to a variable called CurrentDate. I'd then use that variable in my expression for the remote path, being sure to verify that the "Delay Validation" property is set appropriately to avoid using whatever value was saved in the variable.

    -Pete

Viewing 3 posts - 1 through 2 (of 2 total)

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