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

Posted on 2009-05-07
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.
Question by:hennessym
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 22

Accepted Solution

PedroCGD earned 250 total points
ID: 24335354
Use a script task to check if the folder exists and if nor create via imports sistem.IO

Author Comment

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

Expert Comment

ID: 24336479
Take a look to the package I made here and customize a little:

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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