Processed FILES in the order of the file time stamps

  • Hi ,

    I have requirement for Emp files processing. I will have to process the files in the order of the files time stamps. Lets if have files time stamps of the following files in the order :

    Emp files(EmpExport00440_YYYYMMDD_HHMMSS.xml)

    EmpExport00440_20150915_121829.xml

    EmpExport00240_20150915_141239.xml

    EmpExport00123_20150915_151749.xml

    These has to be processed in the order of the file time stamps. Not on the file name but the file system time stamp. I am using For each loop container to load the files in to sql table.

    Could you please help me to get the solution of above scenario.

  • As you have found out the for each loop does not provide ordering out of the box.

    In the past i have used a script component to provide the ordered file list and used the for each loop on the output of that.



    Clear Sky SQL
    My Blog[/url]

  • vipin_jha123 (9/14/2015)


    Hi ,

    I have requirement for Emp files processing. I will have to process the files in the order of the files time stamps. Lets if have files time stamps of the following files in the order :

    Emp files(EmpExport00440_YYYYMMDD_HHMMSS.xml)

    EmpExport00440_20150915_121829.xml

    EmpExport00240_20150915_141239.xml

    EmpExport00123_20150915_151749.xml

    These has to be processed in the order of the file time stamps. Not on the file name but the file system time stamp. I am using For each loop container to load the files in to sql table.

    Could you please help me to get the solution of above scenario.

    You can use Component Script to get list of files and order them by time stamps,then store the list in Object variable of SSIS. After that, you use For Each Loop container within Object variable.

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

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