Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs

Move Multiple files using File System Task in SSIS

by suresh

In this article We will show you, How to Move Multiple files using File System Task in SSIS with example. To Move the single file from one location to another location, Please refer Move File Using File System Task article present in the SSIS page.

We have File System Task Folder inside the Documents drive. The below screenshot shows you the data inside that folder. Our task is to move the 27 files inside the SSIS File System Task Folder to Destination Folder inside E Drive.

Move Multiple files using File System Task in SSIS 1

Move Multiple files using File System Task in SSIS

To move multiple files using File System Task in SSIS, First Drag and drop the Foreach Loop Container into the Control Flow region as shown below

Move Multiple files using File System Task in SSIS 2

Double click on it will open the Foreach Loop Editor to configure it. Before we step into the remaining properties, we have to understand the Enumerator property. From the below screenshot, you can observe that we are selecting Foreach File Enumerator because we want to loop over the files present in our file system.

Move Multiple files using File System Task in SSIS 3

Next, click on the Browse button to select the folder name from our file system. From the below screenshot, you can see we are choosing the FILE SYSTEM TASK folder present in our E Drive. Click the OK button to select it.

Move Multiple files using File System Task in SSIS 4

Within the Files section, we have to specify the file type using the Wildcards. In this example, we want to move all files (irrespective of extensions) from one location to another in our local file system, so we are using Wildcard *.*.

TIP: If you want to send only text files then use: *.txt

Move Multiple files using File System Task in SSIS 5

Next, we have to store the file names in a variable so that we can use them in our File System Task. To do that, go to Variable Mappings section and select the user variable (if any) or create a new variable

Move Multiple files using File System Task in SSIS 6

Once you click on the <New Variable..>, the Add Variable window will open to create a new variable. In this example, we require variables to store the File name and its extension, for instance, SALES1.xls. So, we are creating a string variable and assigned the name as Variable. Click OK to finish creating a string variable.

Move Multiple files using File System Task in SSIS 7

Next, select the created variable and assign it to index 0. Once you completed, click OK to finish configuring the Foreach Loop Container.

Move Multiple files using File System Task in SSIS 8

Next, Drag and drop the File System Task into the Control Flow region and rename it as per your requirements

Move Multiple files using File System Task in SSIS 9

Double click on it will open the File System Task Editor to configure it. In this example, We are Moving multiple files from one location to another. So, Please change the operation property to Move File.

Next, we have to configure the SourceConnection property. In our previous step, we used the Foreach Loop Container to loop over the files and stored the File names with extension in a variable called Variable. So, we are setting the IsSourcePathVariable to True and selecting the User: Variable variable as SourceVariable.

Move Multiple files using File System Task in SSIS 10

Now we have to configure the Destination Connection. So, please select the DestinationConnection property. If you already created the File Connection Manager before then select the created one or If you stored the Destination Connection in Variable then, please change the IsDestinationPathVariable property to TRUE and select the Variable Name.

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

Move Multiple files using File System Task in SSIS 11

In this example, we are Moving existing files to an already existing folder. So, we are selecting the Existing Folder option from the Usage Type. Next, click on the Browse button to select the Existing Folder from the file system. As you see from the below screenshot, we chose the Destination Folder.

Move Multiple files using File System Task in SSIS 12

Click Ok to finish configuring the Move Multiple files using File System Task in SSIS package.

Move Multiple files using File System Task in SSIS 13

Before executing the task, Please change the Delay Validation property of the File system Task to TRUE.

Move Multiple files using File System Task in SSIS 14

Let’s run and see whether we successfully Moved the 27 files from one location to another using the SSIS File System Task or Not.

Move Multiple files using File System Task in SSIS 15

Well, We successfully Moved 27 files present in the File System Task Folder to the Destination Folder.

Move Multiple files using File System Task in SSIS 16

Placed Under: SSIS

  • What is SSIS
  • Install SQL Server Data Tools
  • Learn SSIS in 28 Days
  • Create a SSIS Project
  • Create SSIS Package
  • SSIS Connection Manager
  • OLE DB Connection Manager
  • SSIS ADO Connection Manager
  • ADO.NET Connection Manager
  • SSIS Cache Connection Manager
  • SSIS Excel Connection Manager
  • SSIS File Connection Manager
  • SSIS FTP Connection Manager
  • SSIS SMO Connection Manager
  • Source Assistance in SSIS
  • Flat File Source in SSIS
  • OLE DB Source in SSIS
  • Excel Source in SSIS
  • ADO.NET Source in SSIS
  • SSIS FLAT FILE Destination
  • SSIS OLE DB Destination
  • SSIS ADO.NET Destination
  • SSIS Transformations
  • SSIS Audit Transformation
  • SSIS Aggregate Transformation
  • SSIS Aggregate Advanced Mode
  • SSIS Cache Transformation
  • SSIS Character Map
  • SSIS Conditional Split
  • SSIS Copy Column
  • SSIS Data Conversion
  • SSIS Derived Column
  • SSIS Export Column
  • SSIS Fuzzy Grouping
  • SSIS Fuzzy Lookup
  • SSIS Import Column
  • SSIS Lookup Introduction
  • Lookup – OLE DB Connection
  • SSIS Lookup in Full Cache Mode
  • SSIS Lookup – Case Sensitivity
  • SSIS Merge Transformation
  • SSIS Merge Join Transformation
  • SSIS Merge Join – Left Outer Join
  • SSIS Merge – Right Outer Join
  • SSIS Merge Join – Full Outer Join
  • SSIS Multicast Transformation
  • SSIS OLEDB Command
  • OLEDB Command – Delete Data
  • OLEDB Command-Update Data
  • SSIS Percentage Sampling
  • SSIS Pivot Transformation 2008
  • SSIS Pivot Transformation
  • SSIS Row Count Transformation
  • SSIS Row Sampling
  • Script Component as Source
  • Script Component as Destination
  • SSIS Script as Transformation
  • SSIS Sort Transformation
  • SSIS SCD Type 0
  • SSIS SCD Type 1
  • SSIS SCD Type 2
  • SSIS Term Lookup
  • SSIS Term Extraction Intro
  • Term Extraction – Extract Nouns
  • SSIS Extract Noun Phrases
  • Extract Nouns & Noun Phrases
  • Term Extraction – Exclusion Tab
  • SSIS Unpivot Transformation
  • SSIS Union All Transformation
  • SSIS For Loop Container
  • SSIS ForEach File Enumerator
  • SSIS ForEach SMO Enumerator
  • SSIS ForEach Variable
  • SSIS Foreach NodeList
  • Foreach ADO.NET Schema Rowset Enumerator
  • SSIS Bulk Insert Task
  • SSIS Data Profiling Task
  • Execute T-SQL Statement Task
  • SSIS Execute SQL Task Intro
  • SSIS Execute SQL Task Example
  • Execute SQL Task- Single Rowset
  • Execute SQL Task – Full Row Set
  • SSIS Execute Package Task
  • Execute Packages in SQL Server
  • Execute Packages in File System
  • SSIS Execute Package Project Reference
  • SSIS File System Task
  • SSIS File System Task- Copy Files
  • File System Task-Copy Directory
  • File System Task – Delete Files
  • File System Task – Delete Folder
  • File System Task -Move Directory
  • SSIS File System Task -Move File
  • File System – Move Multiple files
  • File System Task – Rename File
  • File System Task – Set Attributes
  • SSIS FTP TASK
  • SSIS Create Local Directory
  • SSIS Create Remote Directory
  • SSIS FTP Task Send Files
  • SSIS FTP – Send Multiple Files
  • SSIS FTP Task Delete Local Files
  • FTP TASK Delete Local Directory
  • FTP Task Delete Remote files
  • SSIS Delete Remote Directory
  • SSIS FTP Task Receive Files
  • SSIS FTP Receive Multiple Files
  • SSIS Script Task
  • Transfer SQL Server Objects Task
  • Transfer SQL Table Structures
  • Transfer SQL Tables with Data
  • Transfer SQL Stored Procedures
  • Transfer User Defined Functions
  • Transfer SQL Views in SSIS
  • SSIS Web Service Task
  • SSIS XML Task-Validate XML File
  • Transform XML File using XSLT
  • XML Task-XML files Differences
  • Create SSIS Catalog
  • Package Deployment using BIDS
  • Deploy Package Using SQL
  • Deploy using SQL Server Wizard
  • SSIS Breakpoints
  • SSIS Checkpoints
  • SSIS Error Handling
  • SSIS Event Handlers
  • SSIS Transactions
  • SSIS Logging
  • SSIS Parameters
  • SSIS Package Configuration
  • Configure using SQL Server
  • Config using Registry Entry
  • Conf with Environment Variable
  • SSIS XML Configuration File
  • XML Configuration File Part 2
  • SSIS Package Protection Level
  • SSIS Incremental Load
  • Incremental Load Example 2
  • SSIS Remove Double Quotes

Copyright © 2021 · All Rights Reserved by Suresh

About Us | Contact Us | Privacy Policy