Tutorial Gateway

  • C Language
  • Java
  • R
  • SQL
  • MySQL
  • Python
  • BI Tools
    • Informatica
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • QlikView
  • Js

Delete Directory Content Using File System Task in SSIS

by suresh

The File System Task in SSIS allows us to perform Ten types of Operations on Files and Folders. In this article We will show you, How to delete Directory Content Using SSIS File System Task with example. To delete Directory, Please refer Delete Directory Using File System Task in SSIS article present in the SSIS page.

We have File System Task Folder inside the Music Folder. Below screenshot shows you the data inside that folder. Our task is to delete all the content inside the File System Task Folder (.xml, .xls, .txt files and the SSIS Blogger pics folder as well).

Delete Directory Content Using File System Task in SSIS 2014

Delete Directory Content Using File System Task in SSIS

In order to Delete Directory Content Using File System Task in SSIS, Drag and drop the File System Task into the Control Flow region and rename it as Delete Directory Content Using File System Task

Delete Directory Content 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 deleting directory content so, Please change the operation property to Delete Directory Content as shown in the below screenshot

Delete Directory Content Using File System Task in SSIS 2

Let us configure the Source Connection by selecting the SourceConnection property. If you already created the File Connection Manager before then select the created one or If you stored the Source Connection in the Variable then, please change the IsSourcePathVariable property to TRUE and select the Variable Name.

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

Delete Directory Content Using File System Task in SSIS 3

Once you click on the <New Connection..> option, File Connection Manager Editor will be opened to configure it. In this example we are deleting directory content so we are selecting Existing Directory option from the Usage Type

Delete Directory Content Using File System Task in SSIS 4

Click on the Browse button to select the Existing Folder.

Delete Directory Content Using File System Task in SSIS 5

From the above the above screenshot you can observe that, We selected the File System Task Folder

Delete Directory Content Using File System Task in SSIS 6

Click Ok to finish configuring the File Connection Manager.

Delete Directory Content Using File System Task in SSIS 7

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

Delete Directory Content Using File System Task in SSIS 8

Well, We successfully deleted the Content present in the File System Task Folder or Directory.

Delete Directory Content Using File System Task in SSIS 9

Thank You for Visiting Our Blog.

Placed Under: SSIS

Stay in Touch!

Sign Up to receive Email updates on Latest Tutorials

  • C Programs
  • Java Programs
  • SQL FAQ’s
  • Python Programs
  • SSIS
  • Tableau
  • JavaScript

Copyright © 2019 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy