Get File Properties in ssis??

  • How to monitor the properties of dynamically changing flat files in ssis...??

  • Which properties? You'll probably have to use a script task to get the majority of the file system properties (size, dates, attributes etc.)

  • how to get these properties(date,size,attribute..) for dynamically changing flat files using script task..?

    for Ex: Rej45, cmd56, dre54..

  • You could use a For Each File Enumerator to populate a variable with the full file path/name, then make this an input to your script task. You can then use the .NET System.IO.Fileinfo class in the script task to retrieve the values you need and either output these as variables or perform an action within the script task itself (such as a move/delete).

    You could also ditch the for each file enumerator if you don't need to do anything with the files using another SSIS task type and use one of the .NET methods of cycling through files and performing an action on each of them.

  • sandhya.kacham (3/12/2012)


    how to get these properties(date,size,attribute..) for dynamically changing flat files using script task..?

    for Ex: Rej45, cmd56, dre54..

    I have a better question, why don't you tell us what your end goal is and we'll try and help you get there as opposed to trying to solve one of the problems along the way for the solution you think you want to do.

    CEWII

  • Hi

    Am trying to load data from flat files to sql tables using for each container and in between this process i would like to read corresponding file properties to one sql table just for information and am using script task to read all these properties but it is not working as expected.

    Can i get any help regarding this..??

  • sandhya.kacham (3/12/2012)


    but it is not working as expected.

    Can you be a bit more specific here?

    It's like going to the garage with your car and say to the mechanic:

    "Car doesn't work. Plz fix. I'll pick it up at 5."

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 7 posts - 1 through 6 (of 6 total)

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