Searching for a string pattern in SSIS

  • I have a File System Task inside a For Each loop container

    I need to look for a specific string "TXN" in the file name and if it finds then move the file to a separate folder.

    I have a variable

    vFileName = \\myShare\NMNClient\Files\NMNClient_TXN _20110701.txt

    In the Conenction string property of the file Connection Manager I have @[User::vFileName]

    This works great for moving the file NMNClient_TXN_20110701.txt

    But I need help on looping through the folder to find any file that has "TXN" string in the filename to move them.

    Thank you in advance!

  • Stick your File System task into a For Each Loop container. Pass the file name / path down from the For Each Loop to the variable and use the variable in the File System Task.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

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

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