Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Need SSIS package to process all XML files in a directory and archive them when finished

Posted on 2009-05-07
3
Medium Priority
?
237 Views
Last Modified: 2012-05-06
Hi folks,

I'm new to SSIS so bear with me...

I'm trying to create an SSIS package to process all XML files in a directory and archive them when finished.

Basically I'd like the package to create a currentdate subfolder (Archive\CurrentDate\) if it doesn't already exist and then move the files as they're processed to that subfolder.

I have the XML Source and my OLEDB destination inside a ForEach Loop Container, but how do I test whether a directory exists, create one if necessary, and move the files?

Thanks in advance.
0
Comment
Question by:hennessym
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
PedroCGD earned 1000 total points
ID: 24335354
Use a script task to check if the folder exists and if nor create via imports sistem.IO
helped?
regards,
Pedro
www.pedrocgd.blogspot.com
0
 
LVL 1

Author Comment

by:hennessym
ID: 24336383
Thanks - do you have any sample code?
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24336479
Take a look to the package I made here and customize a little:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/Q_24329323.html
Helped?
Regards,
Pedro
www.pedrocgd.blogspot.com
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

810 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