Wednesday 23 October 2013

File System Task in SSIS

In this article I will discuss File system task in SSIS. File system task in SSIS is used to perform file or Directory related operations which are creating, moving, and deleting files or directories.

Drag and Drop File system task from tool box on to control flow tab as shown in Figure 1

clip_image002 Figure 1

Double click the File system task which display configuration editor as shown in Figure 2. Task editor has only two tabs.

clip_image004 Figure 2

In General tab, you can specify the Operation type and Connections which are required to perform the operation. Here connections can be specified through variable or file connection.

The File system task options are

Copy Directory: Copies all files from one directory to another directory which requires both source and destination connections.

Copy File: Copies a specific file. Which requires both source and destination connections.

Create Directory: creates directory which requires only source connection.

Delete Directory: deletes directory which requires only source connection.

Delete Directory content: deletes all files from directory which requires only source connection.

Delete File: deletes file which requires only source connection.

Move Directory: Moves directory from one location to another location which requires both source and destination connections.

Move File: Moves a specified File from source to destination which requires both source and destination connections.

Moving File or Directory option requires OverWriteDestination need to be set. If OverWriteDestination option set to false the task fails if File or Directory exists in destination.

Rename File: Renames a file which requires both source and destination connections.

Set Attributes: Which sets attributes (Hidden, Ready only, Archive, System) for a file which requires only source connection.

The best thing in SSIS is if you want create Directory C:\SSIS\FileSystemTask\Directory1\File\ all you need to do is specify full path in task which creates all directories at a time. You need not to create each directory individually through task.

But the same will not work when are you are moving directory from source to destination directory (C:\FileSystemTask to C:\FileSystemTask\SSIS\FileSystem) the task fails if destination does not exist.

NOTE: Please leave a comment

Technorati Tags: ,,,

1 comment:


  1. Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing on Msbi online training
    Msbi online training Hyderabad
    Msbi online training India
    Msbi online course
    Msbi certification training

    ReplyDelete