Solved

ssis read filenames from a folder into an object type variable

Posted on 2012-03-09
1
516 Views
Last Modified: 2012-03-12
1. I am extracting a zip file in a folder. I want to read all the extracted file names from that folder in a script task (string[] file_names = Directory.GetFiles(@"c:\MyDir\", "*.pdf");)).
2. Now, I want to write the array file_names in an SSIS object type variable, so that I can insert each file name in a table and use it for my comparison and further processing.

How do I accomplish step 2 ?
0
Comment
Question by:patd1
1 Comment
 
LVL 21

Accepted Solution

by:
Jason Yousef, MS earned 500 total points
ID: 37704980
You can do step 1 without a script task, using a "FOR EACH LOOP Container"
This link will help you...http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx

Anyway if you still want to use a script task, please post your current FULL script, so I can test and integrate step 2.

Ragards,
Jason
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now