Looping through Files using ForEach Loop container in SSIS 2008 R2



In this post we are gonna discuss about Looping through Files using ForEach Loop container in SSIS 2008 R2. For each loop container is used to iterate through collection of objects and in this case we are gonna discuss about looping through each file in the given path.

In te below example we are gonna loop through the files and shown the path of the file in a popup message but in the pace of popup we can write different functionality like moving the files to different folders and so on.

Step 1: Click on Start —-> Programs —–> Microsoft SQL Server 2008 —-> SQL Server Business Intelligence Development Studio

Step 2: Now On below screen Go to File —-> New —-> Project

Step 3: By clicking Project we will get below window. In this window select Integration Services Project and give a proper name to solution and project. Then click OK.

Step 4: You will get following screen. As you can see, it has four tabs Control Flow, Data Flow, Event Handlers and Package Explorer.

Step 5: While staying on Control Flow tab, from toolbox side menu drag and drop For Each Loop Container on Control Flow Pane.

Step 6: Following same step drag Script Task (to popup the path) inside the For Each Loop Container. Name these two tasks with some relevant name. After doing this your screen will look like below. I have given Loop through Files name to For each loop container and Script task to Show file name.

Step 7: Right click on For Each Loop Container select EDIT. Below screen will appear, fill in the required properties:

Below is the list of properties and values to be supplied

Enumerator: For each File Enumerator
Folder: Give full path of folder in which we need to iterate.
Files: *.pdf (this will iterate through all pdf files)
Retrieve file name: Fully qualified (will return full path)

Step 8: Now go to Variable Mappings. Create a new variable as shown on screen. Then click OK. The path of each file will be assigned to this variable while looping.

Step 9: Now right click on Script Task/Show File Name. Select Edit and whenScript Task editor wondow pop up select Edit Script Button

Step 10: Clicking on Edit script will open visual studio code the inside main method we will right code to show a message box with file name in it.

public void Main()



// TODO: Add your code here

Dts.TaskResult = (int)ScriptResults.Success;


In ReadOnlyVariables give name of variable which you created to hold file name. In this case it is User::FileName.

Then click OK and return to our package.

Step 11: Now run the package and you will get to sc below result.

This message box is showing iterating through pdf files and showing full path and name.

This was the basic use of For each loop container control flow task. This task can be used in very useful scenarios.

Roopesh Babu V


  1. canadian drug pharmacy [url=http://cheapdr.top/#]discount prescription drugs[/url] buy prescription drugs

  2. best natural ed treatment [url=http://cheapdr.top/#]medicines for ed[/url] viagra vs cialis bodybuilding

  3. As I am looking at your writing, slotsite I regret being unable to do outdoor activities due to Corona 19, and I miss my old daily life. If you also miss the daily life of those days, would you please visit my site once? My site is a site where I post about photos and daily life when I was free.

  4. pillole per erezione in farmacia senza ricetta [url=https://viasenzaricetta.com/#]viagra online in 2 giorni[/url] viagra generico prezzo piГ№ basso

  5. viagra online consegna rapida [url=https://viasenzaricetta.com/#]alternativa al viagra senza ricetta in farmacia[/url] viagra 100 mg prezzo in farmacia

  6. 40 Burning Hot is a video slot from the provider EGT. In this 40 Burning Hot slot review you can read more about the features of the game. 40 Burning Hot marks itself out as different with a mildly Irish twist on the formula: a green background is the biggest difference, but the four leafed clovers on the reels are also new. The sounds on Burning Hot 40 aren’t fantastic. You get the classic clicks and whirs for the reels, whistles, and bells throughout the game when you win or the symbols appear. Overall, Burning Hot 40 is what we would expect from a classic slot game. The vintage gameplay and sounds make this game an instant hit. If you enjoy classic casino slots, you’re going to love Burning Hot 40. With Burning Hot 40, you get an updated version of one of the most popular games to grace the screen of the one-armed bandit. With more pay lines and progressive jackpots, Burning Hot 40 has everything you’re looking for in a casino slot classic. Featuring five reels and 40 pay lines, and double-or-nothing bonus rounds, there’s plenty of ways to win with this game.
    Then, if you need more Slots of this kind, have a look at our curated list of the best pirate Slots. Among the many sub-categories of slots, you will find both recently released and already established player-favourite titles. Who Wants To Be A Millionaire, Kingmaker Megaways, Wild Times, Rainbow Riches, Planet of the Apes, and Great Rhino are just a few examples of what you can expect to find in the Novibet Casino slots library. If you are really into slots, we can hardly think of a better place for you to open an account. Novibet Sports is considered one of the best online sportsbooks in the business. We put it to the test in our Novibet review 2023 too. We found a lot of truth in our first statement! There are more than 65,000 events usually covered by the bookmaker and the odds are generally sharp. Some special selections have 100% payouts, as the operator doesn’t take a cut.

  7. водительские удостоверения
    [url=https://cashtop.tel/]готовые проекты бизнеса[/url]
    гражданство украина

    [url=https://cashtop.tel/topic/904-udostovereniia-prokuraturymvd-i-td/]заливы на карты[/url]

  8. recommended canadian pharmacies [url=https://canadapharm.pro/#]canadian king pharmacy[/url] canadian pharmacy king

  9. гей порно 18+
    [url=https://steambalance.ru/]порно сайт для геев steambalance.ru[/url]
    steambalance обман на деньги
    [url=https://steamstar.ru]steamstar мошенники кидки[/url]
    мошенники развод на стим баланс

  10. canadian pharmacy 24 [url=http://canadapharm.pro/#]canadian pharmacy scam[/url] canadian pharmacy world reviews

  11. Test all the APIs in this collection and let us know which one you think is the best football API to help you build a website or mobile app. Each soccer API has multiple endpoints and parameters to help provide the soccer data feeds that fits your needs. Filter by your favorite league, team, match, game, or even player to gain insight and stats into all things Football. Click into each API endpoints page to find the latest version of each API. Puoi vedere la versione Italian su BeSoccer.com. Competition: Serie B Market: Frosinone win Odds: 19/20 @ 888sport Looking to extend their buffer at the top of the Serie B table this weekend, Frosinone will host Cagliari on Sunday afternoon. Starting with the hosts, only continuing on what has been a stellar purple patch, Frosinone appear to be skyrocketing their way to a
    Score: Rams 17, Packers 20 The Packers opened their first possession at the Dolphins’ nine-yard line after a Keisean Nixon 93-yard kick return. Running back Aaron Jones picked up four yards on the first play, taking the ball to the Dolphins four-yard line. On 2nd-and-Goal, linebacker Elandon Roberts rushed up the middle and pulled down the packers’ quarterback for a 13-yard sack. An incomplete pass on third down led to a Packers field goal. Tied 3-3. Packers head coach, Matt LaFleur: “Obviously this is as disappointing as it gets for us. Give New York all the credit. They out-coached us, they outplayed us. Jan 2, 2023, 3:30:30 PMyebscore “He’s a really good receiver,” Alexander said, according to ESPN’s Rob Demovsky. “But at the end of the day, I’m a really good corner. We’ve got really good corners, we’ve got really good linebackers, D-line, whatever it is.

  12. pharmacy website india [url=http://indiapharm.pro/#]online shopping pharmacy india[/url] indian pharmacy online

  13. Ваши деньги будут переведены продавцу только после подтверждения вами получения товара или после истечения срока Защиты Покупателя. Класс: аксессуары для SPA Специальные цены для профессионалов Информация Оплатить покупку можно большинством популярных средств оплаты (оператор платежей Alipay): Дополнительные насадки обычно идут в комплекте с роллером, либо модель может быть двухсторонней: с одной стороны гладкий ролик, с другой – игольчатый, для улучшения кровообращения в коже и подкожных тканях. Из какого материала сделана ручка, принципиального значения не имеет, но если тоже из нефрита, держать такой инструмент в руке приятней, а заодно легкий массаж получат и ладони. Информация Дополнительные характеристики: Так есть ли эффект от нефритовых массажеров? Используйте в сочетании с тканевой маской Вы можете приобрести нефритовые ролики во многих магазинах а также в интернете, но если вы покупаете онлайн, я всегда призываю вас убедиться, что вы получаете один из авторитетных брендов.
    Лайнер-гель для глаз Maybelline New York Master Drama Черный за 874 руб. Еще один легкий способ вдохнуть жизнь в засохшую подводку — несколько раз пройтись лайнером по тыльной или фронтальной стороне ладони. Это, конечно, не самое экономное решение, потому что делать эти «эскизы» придется до тех пор, пока не появится четкая свежая линия, но прием работает. По сути, он напоминает процесс «расписывания» новой ручки. Лучшая и самая простая в использовании подводка – та, которая позволяет создать желаемый макияж глаз. Как жидкая подводка, так и гелевая – продукты равного качества, поэтому каждый пользователь выбирает для себя подходящий продукт, в зависимости от способа нанесения, формы глаз, привычек. Лайнер-гель для глаз Maybelline New York Master Drama Черный за 874 руб. На Вашу почту отправлено письмо с инструкциями по завершению регистрации.

  14. [url=https://vavada-kazino-onlajn.dp.ua/]Vavada[/url]

    Ласкаво просимо гравця сверху офібукваійний сайт онлайн казино Vavada UA. Гральний портал вважається найкращим на Україбукваі і функціонує буква 2017 року. Власником толпа є Delaneso Broad Society Ltd.

  15. reliable online pharmacy [url=http://pillswithoutprescription.pro/#]canadian online pharmacy no prescription[/url] canadian drugs pharmacies online

  16. buy ed pills online [url=http://edmeds.pro/#]best ed medication[/url] cheapest ed pills online

  17. canadian pharmacy cialis cheap [url=https://fastdeliverypill.com/#]medicine from canada with no prescriptions[/url] certified canadian pharmacies

  18. [url=https://uborka-proizvodstvennyh-pomeshhenij.ru/]уборка производственных помещений[/url]

    сухая и сырая электроуборка полов; эпиляция загрязнений с крупногабаритной техники, антикоррозионная электрообработка; уборка санузлов и душевых кот применением загородившего обеззараживающих составов; чищенье резервуаров и емкостей.
    уборка производственных помещений

  19. canadian mail order drugs [url=http://fastdeliverypill.com/#]meds without a doctor s prescription canada[/url] cheap rx drugs

  20. cheapest online pharmacy india [url=http://pharmacyindia.pro/#]top 10 pharmacies in india[/url] top 10 pharmacies in india

  21. india online pharmacy [url=http://pharmacyindia.pro/#]buy prescription drugs from india[/url] top online pharmacy india

  22. top 10 online pharmacy in india [url=http://pharmacyindia.pro/#]india pharmacy[/url] best india pharmacy

  23. The potential benefits of cognitive-behavioral therapy (CBT) in treating psychological factors contributing to ED are being explored. CBT can help individuals identify and modify negative thought patterns and behaviors that may affect sexual function. cenforcebnr.com order cenforce 50mg online

  24. best over the counter ed pills [url=https://edpillsfd.online/#]erection pills online[/url] erection pills that work

  25. canadian pharmacy cheap [url=http://pharmfd.com/#]canadian pharmacy without prescription[/url] canadian pharmacy

  26. The use of penile revascularization surgery as a treatment option for erectile dysfunction is being explored. This surgical procedure aims to restore blood flow to the penis by bypassing blocked or damaged blood vessels.
    levitra generic name http://www.vardenafilotc.com

  27. no prescription needed canadian pharmacy [url=https://pharmfd.com/#]certified canadian international pharmacy[/url] script pharmacy

  28. indian pharmacy [url=https://indiapharmfd.online/#]indian pharmacy[/url] online shopping pharmacy india

  29. buy propecia no prescription [url=https://propecia.pro/#]Best place to buy finasteride[/url] where to buy propecia without a prescription

  30. Researchers are studying the effects of chronic medication use, such as antihypertensives and antiretrovirals, on erectile function. Collaborative medication management and consideration of alternative medications can help minimize sexual side effects.
    buy fildena 50mg https://fildena.homes/

  31. buy kamagra online [url=https://kamagratabs.pro/#]buy kamagra online[/url] Kamagra Gold 100mg price

  32. Kamagra Gold 100mg price [url=https://kamagratabs.pro/#]Oral Jelly 100mg Kamagra price[/url] Kamagra 100mg

  33. Quitting smoking is crucial for overall health, including sexual health. Smoking damages blood vessels and reduces blood flow, which can contribute to ED. Seeking support and using cessation aids can increase the chances of successfully quitting.
    fildena 100mg price buy sildenafil 50mg without prescription

  34. Kamagra Gold 100mg price [url=https://kamagratabs.pro/#]Kamagra Gold 100mg price[/url] Kamagra Oral Jelly for sale

  35. buy generic propecia prices [url=https://propecia.pro/#]Best place to buy finasteride[/url] get propecia without insurance

  36. buying from online mexican pharmacy [url=https://mexicanpharmacies.pro/#]mexican mail order pharmacies[/url] mexican mail order pharmacies

  37. pharmacies in mexico that ship to usa [url=https://mexicanpharmacies.pro/#]mexico drug stores pharmacies[/url] mexico drug stores pharmacies

  38. [url=https://intimkuastrpny.dp.ua/]intimkuastrpny[/url]

    Страпоны и фаллопротезы. Удосужиться подкатегорию, Безремневые страпоны, Для девушек, Чтобы сильный пол, Забаллотировавши, Двойные, Трусики harness, Насадки чтобы страпонов.

  39. Paxlovid buy online [url=http://paxlovid.pro/#]Paxlovid over the counter[/url] buy paxlovid online

  40. birth control pills cost [url=http://birthcontrolpills.pro/#]over the counter birth control pills[/url] birth control pills

  41. Sin embargo, es importante destacar que Cialis solo debe ser utilizado bajo supervision medica y siguiendo las indicaciones adecuadas. Tambien puede tener efectos secundarios y no es adecuado para todos los hombres, especialmente aquellos que tienen problemas cardiacos o toman ciertos medicamentos.
    ?Cialis funciona! Y si, ?esta clinicamente probado!
    Ya lo dijimos, pero vale la pena volver a mencionarlo, cialis 5mg es la unica pastilla para la disfuncion erectil clinicamente probada que funciona hasta 36 horas. Este medicamento ya ha [url=https://comprarcialis5mg.org/it/]cialis 5mg[/url] sido sometido a multiples investigaciones clinicas que demostraron su capacidad para ayudar a mejorar la ereccion de los pacientes en un estudio controlado mediante placebo. El resultado fue que en un universo de mas de 700 pacientes, el 88% informo una mejora significativa en su ereccion.

  42. canadian pharmacy world [url=http://canadianpharm.pro/#]certified online pharmacy canada[/url] canada drug pharmacy

  43. аппарат для вытяжки позвоночника
    санаторий эллада анапа официальный сайт
    гостиницы железногорск красноярский край


  44. best medication for ed [url=http://edpills24.pro/#]ed drugs compared[/url] cheapest ed pills online

  45. medication from mexico pharmacy [url=https://mexicanpharmacy.life/#]mexico pharmacies prescription drugs[/url] mexican border pharmacies shipping to usa

  46. best male ed pills [url=https://edpills24.pro/#]medicine for impotence[/url] medicine for erectile

  47. purple pharmacy mexico price list [url=https://mexicanpharmacy.life/#]purple pharmacy mexico price list[/url] mexican border pharmacies shipping to usa

  48. top online pharmacy india [url=https://indiapharmacy.world/#]reputable indian pharmacies[/url] online shopping pharmacy india

  49. [url=https://canadianpharmacy.legal/#]precription drugs from canada[/url] legit canadian pharmacy

  50. [url=https://certifiedpharmacy.pro/#]meds without a doctor s prescription canada[/url] certified canadian pharmacies