Find a flie, please help

  • Howdy

     

    I am using SSIS and need to d if a backup of a file is there. I’m in a hurry so please do not tell me to go read articles unless the article is exactly what I need.

     

    The problem is the file is named as Bob_YYYYMMDDTIME.bak

     

    I need to make the YYYYMMDD variable and form the name param before looking for the file as all files have this suffix.

     

    I can avoid the TIME problem because there will only be 1 Bob file a day.

     

    So I suppose I need to start by:

     

    Reshaping the date to 20060605

    Adding that to a param Bob_20060605

    Searching the folder for Bob_20060605*.bak

    And if the file is found call a stored proc.

     

    Can anyone help me out?

     

    Thanks in advance

  • Yeah, you'll need a MultiFile Connection Manager, the connection string of which is set by an expression. That expression should evaluate to "Bob_20060605*.bak"

    You said you didn't want links unless they were absolutely specific and I can't think of anything that exactly addresses the expression that you need so I'll jsut say that there is loads on Google if you want it: http://www.google.co.uk/search?hl=en&q=ssis+expressions&meta=

    You should then be able to delete all the files using FileSystem task.

     

    I admit i haven't tried this out - but it should work!

    -Jamie

     

  • Thanks!

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

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