Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


SSIS Loop through folders with specific names

SSIS Loop through folders with specific names

I am attempting to loop through files in folders with the root of the name as tndlogs for example tndlogs, tndlogs0,
 tndlogs1. The problem that I run into is that the SSIS expression language does not support wild card characters so
 using tndlogs* looks for a specific folder named tndlogs*. My thought is to  read
 all directory names that meet this criteria into a recordset and loop through them but how would I go about getting this list?

RE: SSIS Loop through folders with specific names

What i would do is this:

Loop through all folders.  Then on each iteration run a small bit of VB script that checks to see if the folder name meets your spec.

If it does - set a variable to true, if not set it to false.

The continue within the iteration of folders but only do stuff where the variable is true (using a flow constraint).

Hope this helps



Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Bernard Baruch

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra

RE: SSIS Loop through folders with specific names

Thanks for all the help, I wrote a simple c# script task to pull the shared directories from the computer in question then looped through each directory and added to a collection object if it contained the criteria in its name.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close