Home Forums Data Warehousing Integration Services way to get just the latest file from stft site without scripting or creation of a sql table for parsing filenames? RE: way to get just the latest file from stft site without scripting or creation of a sql table for parsing filenames?

  • pietlinden, in the end, the approach I took was to create the portion of the filename that holds the date using functions and concatenate it to the part of the filename that always stays the same.

    part-of-filename-that-doesn't-change + (dt_wstr,4)year(getdate()) + right("0"+(dt_wstr,2)month(getdate()),2)+right("0"+(dt_wstr,2) day(getdate()),2)+".csv"

    The dtsx package will run everyday looking for a file having the current day's timestamp, and retrieve only it.

    This idea was fortunately advised to me by my boss...which is great because I think your suggested method, peitlinden, is the only alternative to scripting. Hope you are having wonderful holidays.