Move the files in 5 different folders based on File names ssis

  • nibir_c

    SSC Veteran

    Points: 216

    Hi,

    I am new to SSIS.please help me with this.

  • nibir_c

    SSC Veteran

    Points: 216

    I think i didn't make myself clear.i have several files in a folder.now i want to move the files to 5 different folders based on the file names.how to do it.?

  • Devendra (Dev) Shirbad

    SSC-Forever

    Points: 42488

    File System Task

    http://msdn.microsoft.com/en-us/library/ms140185.aspx

  • Koen Verbeeck

    SSC Guru

    Points: 258890

    In the For Each Loop you can specify a wildcard search for which files the For Each Loop should pick up.

    So you configure 5 For Each Loops. Each loop picks up the files of a certain filename and dumps them in the corresponding folder. (the dumping part is done with the filesystem task)

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

  • rajiv.kumarb

    SSC Enthusiast

    Points: 127

    u can use Single For Loop,( assign the file name into variable,)

    and u can use scriptTask to read the fileName (from variable) and move the file to relavant location.

    thanks,

    rajivkumar

  • Koen Verbeeck

    SSC Guru

    Points: 258890

    rajiv.kumarb (1/30/2012)


    u can use Single For Loop,( assign the file name into variable,)

    and u can use scriptTask to read the fileName (from variable) and move the file to relavant location.

    thanks,

    rajivkumar

    Why not just write the entire thing in C#? Looping would be a bit more efficient in .NET then in SSIS. (less overhead)

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

  • rajiv.kumarb

    SSC Enthusiast

    Points: 127

    yes ,we could obviously use C# foreach loop and handle the condition based files movement

    thanks

    rajiv

  • josepena87

    SSC Journeyman

    Points: 79

    Come on people, the user needs help! there first post was:
    "Hi,
    I am new to SSIS.please help me with this"...

    The link offered: http://msdn.microsoft.com/en-us/library/ms140185.aspx
    Does not answer the question, and is only one part of the process.

    Everyone else is not offering a true solution to the question because your just stating:
    Use c# script task, for each loop, use single for look, just configure this and your set. He was new back then. When you started out did you know how to write c# as a newbie? or use for each loops?

    Come on people he was new 6 years ago and I still see this happening with other forums. Offer true start to finish solutions if your going to attempt and answer a question.

    I see this often where people just reply in a very smart way just do this and that, but don't offer a comprehensive answer.

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

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