

Out of the various Foreach enumerators found in the Collection tab, we will choose only the Foreach File enumerator. At this point of time, the package design looks as under: Step 4: (Configure the Foreach Loop Container)ĭouble click on the Foreach Loop container for opening up the Foreach Loop Editor.

Next, let us add a File System Task inside the Foreach loop container. Let us drag and drop a Sequence Container on to the Control Flow window and add a Foreach Loop Container inside it. We have renamed the default package to FileCopyAndRename_pkg.dtsx. Let us create a new BIDS project and choose Integration Services Project as the project template: The expected output should be as under: Step To Be Carried Out Step 1 The objective is to copy these files from the source location to the destination folder such that the file names should be renamed as per the timestamp. The source folder is as under: Expected Output Henceforth, I thought of documenting the same for those who have not yet encountered it but will do so in the near future. The example upon which the article has been written is a very common task that many of us have faced.

This article will show the usage of working with Sequence Container, Foreach Loop container, File System Task and Script Task components. SSIS has simplified the approach of accomplishing very complex tasks for which we would have otherwise needed to write lots of code. In this article, I agree that there are many steps for which I need not have given a diagrammatic approach, but by keeping in mind that many new SSIS developers will like a complete step by step approach, I have presented the content in its entirety.

This is a very common task and in the following paragraphs, we will explore how to do this. Recently, we encountered a situation where given some text files in a source folder, we needed to copy them to a destination folder and the file names had to be time stamped.
