Home Forums SQL Server 2005 Business Intelligence Import Dynamic File Name with a Date/Time as the file type (YYYYMMDDHRMMSS) RE: Import Dynamic File Name with a Date/Time as the file type (YYYYMMDDHRMMSS)

  • Tom_Sacramento (6/11/2013)


    Not to oversimplify, but once the newest file is identified one option is to use script to copy it to a predetermined name like workfile.csv. Then when done, dispose or archive.

    I have dealt with dynamic names, and I have also coerced them into a 'working file' name, just depends if you need to preserve the original, I usually recommend doing this for audit and recovery.

    HTH

    Thank you for bringing the conversation back to the original intent. Maybe you doing it will make it stick.

    I do not have a problem with what you're saying, but I usually would not bother doing this unless it's a decoupled process. If the SSIS Package that determines the newest file is the same one that will eventually process the file then setting a local variable to the name of the newest file and having the Flat File Connection Manager that points to that file take it's Connection String from a Variable built from an Expression then there is no need to rename anything. Once we know the name of the newest file the rest of the SSIS Package can be setup to refer to the name dynamically. In the case of a Script Task this would mean passing in a Read/Write Variable and setting it once the newest file were found.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato