SendMail Task dynamic file name

  • I have created a FTP Task which copys a file from an FTP site to a local folder. The file name is dynamic and would look like:

    LiveScore_20090126.pdf

    The FTP task will be run daily and the file name will change to include the current date.

    After the FTP task has run I want to create a "SendMail" task.

    How do I get the "SendMail" task to look for a dynamic file name?

    I have tried using "Expression" --> fileAttachment

    "LiveScore"+(DT_STR, 4, 1252) YEAR

    ( GETDATE()) + RIGHT("0" + (DT_STR, 2, 1252)

    MONTH( GETDATE()), 2) + RIGHT("0" + (DT_STR, 2, 1252) DAY

    ( GETDATE()), 2) +".pdf"

    But this errors:

    Either file does not exist or you do not have permission to access the file.

    BUT

    If I run the FTP Task fist.... then the Send mail... it works!!!

  • I don't understand your problem because at the end of your post you say:

    "If I run the FTP Task fist.... then the Send mail... it works!!!"

    Forgive me if I've misread something but in what other order can this be run? The FTP Task MUST run first and then the Send Mail Task. So what's the problem?

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

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