Solved

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

Posted on 2009-05-07
3
228 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 250 total points
Comment Utility
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
Comment Utility
Thanks - do you have any sample code?
0
 
LVL 22

Expert Comment

by:PedroCGD
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

7 Experts available now in Live!

Get 1:1 Help Now