SSIS Expression on getting the specific files

  • Hello,

    I am developing the SSIS and stuck on copying specific files.

    1. We receive CSV file to our drive on a daily basis.

    2. The csv file name has the last 8 digits formatted with the yyyymmdd. For example, the file name might be abcdef_20150226.csv This means it will be our CSV file for today, Thursday, February 26, 2015.

    3. There are a lot of files in this directory.

    http://i.imgur.com/Fc2rTy8.png (image file) I could not get this post to work.

    -----------------------

    What we would like to do:

    Add the constraints (or expression) that will copy the files from this directory to another directory that have the date equivalent to Monday only. For example, the file abcdef_20150226.csv will not be copied because it is Thursday file. But the abcdec_20150223 will be copied to a new Directory because it is Monday.

    I think it is in the Expression, but I need your assistant in writing this part.

    Thanks.

  • I would use a variable to hold the name of the directory you want to copy the files to.

    I would use a script task to set the correct value of this variable.

    I would then use this variable to set the destination for the FileSystem task that will copy the file.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

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

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