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.
Files inside the Copied folder are:
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
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
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..>.
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
Click on the Browse button to select the Existing Folder.
From the above image, you can see we selected the SSIS BLOGGER pics folder inside the File System Task Folder
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..>.
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.
From the above screenshot, observe that we selected the Copied Folder by clicking the Ok button.
Click Ok to finish configuring the File Connection Manager for the destination.
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.
Well, We successfully Moved the SSIS blogger pics directory present in the File System Task Folder to the Copied Folder Directory.