Copy Directory Using File System Task in SSIS

In this article, we show you how to Copy Directory Using File System Task in SSIS from one location to another location with example. To Move the complete Directory, Please refer Move Directory Using File System Task article inside the SSIS page.

We have File System Task Folder inside the MSBI Folder. Our job is to Copy the SSIS Blogger pics folder inside the File System Task Folder to Copied Folder inside F Drive.

Copy Directory Using File System Task in SSIS

Files inside the Copied folder are:

Copy Directory Using File System Task in SSIS

Copy Directory Using File System Task in SSIS

Drag and drop the File System Task into the Control Flow region and rename it as Copy Directory Using File System Task in SSIS

Copy Directory Using File System Task in SSIS 1

Double click on it will open the File System Task Editor to configure it.

In this example, We are Copying directory. So change the operation property to Copy Directory

Copy Directory Using File System Task in SSIS 2

Let us configure the Source Connection by selecting the SourceConnection property. If you have already created the File Connection Manager, select the created one. Or If you stored the Source Connection in ta Variable, replace the IsSourcePathVariable property with TRUE and select the Variable Name.

Here, We haven’t created any connection Manager before so, We are selecting <New Connection..>.

Copy Directory Using File System Task in SSIS 3

Clicking the <New Connection..> option will open the File Connection Manager. In this example, we are Copying an existing directory. So we are selecting Existing Folder option from the Usage Type

Copy Directory Using File System Task in SSIS 4

Click on the Browse button to select the Existing Folder.

Copy Directory Using File System Task in SSIS 5

From the above image, you can see we selected the SSIS BLOGGER pics folder inside the File System Task Folder

Copy Directory Using File System Task in SSIS 6

Click Ok to finish configuring the Source Connection.

Now we have to configure the Destination Connection. So, please select the DestinationConnection property. If you already created the File Connection Manager, select the same. Or If you put the Destination Connection in a Variable, change the IsDestinationPathVariable property to TRUE and select the Variable Name.

Here, We haven’t created any destination connection Manager. So, we are selecting <New Connection..>.

Copy Directory Using File System Task in SSIS 7

Once you click on the <New Connection..> option, File Connection Manager Editor will be opened to configure it. Click on the Browse button to select the Existing Folder.

Copy Directory Using File System Task in SSIS 8

From the above screenshot, observe that we selected the Copied Folder by clicking the Ok button.

Copy Directory Using File System Task in SSIS 9

Click Ok to finish configuring the File Connection Manager for the destination.

Copy Directory Using File System Task in SSIS 10

Click Ok to finish configuring Copy Directory Using File System Task in SSIS package. Let’s run and see whether we successfully Copied the Directory using the File System Task or Not.

Copy Directory Using File System Task in SSIS 11

Well, We successfully Moved the SSIS blogger pics directory present in the File System Task Folder to the Copied Folder Directory.

Copy Directory Using File System Task in SSIS 12