Archive File and Bad Files in SSIS

Shambhu Rai 1,411 Reputation points
2022-04-03T11:16:02.07+00:00

HI Expert,

I wanted to move the file to Archive and Bad file . once the file processed it should moved to folder B and if any issue then it should move folder c

folder A Main folder for data load
Folder B Archive folder - file should move to Archive folder after load
Folder C when the file failed in processing then it should move to Badfile

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,525 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,263 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 35,556 Reputation points
    2022-04-04T01:41:14.98+00:00

    Hi @Shambhu Rai ,

    You may add a new data flow task to use File System Task to move files to bad files.

    Then when connecting the second task to previous Data Flow Task, right click on the Precedence Constraint and click the "Failure" option.

    189515-image.png

    You may also use event handler in your task.

    integration-services-ssis-event-handlers

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.