Loop over folders in a folder
hello,
i want to create an SSIS package which will let me pull data from a specific folder X.
Now , folder X has several sub-folders, say 1, 2, 3, etc. Their names can change each time. and these folders in turn have several csv files. I want to pull data from these csv files.
I know that we can loop over files in a folder using the for each task. Can this task be used for a problem like mine? I am thinking of something like outer for each ( for folders) and inner for each ( for files). But can u loop over folder names for the
outer for each?
I know that we have foreach file enumarator for files, do we have something for folders?
Thanks
Charu
September 9th, 2011 5:11am
Hi,
have a look into the following sample, which hopefully resolve your problem.
http://msftisprodsamples.codeplex.com/wikipage?title=SS2008%21ForEachDirectory%20Sample&referringTitle=Home
Cheers,
Zaim Raza
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2011 5:25am
I created a Foreach Folder 'enumerator' with a Script Task:
http://microsoft-ssis.blogspot.com/2011/01/foreach-folder-enumerator.html
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com
September 9th, 2011 5:39am
check
http://plexussql.blogspot.com/2009/10/how-to-loop-through-files-in-ssis.html
you can add a script to cut the file names and have the folders and the file names in a different SSIS object
Sincerely SH -- MCITP 2008, MCTS 2008 & 2005 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s).
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2011 9:16am