Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need LoopForEach function for SSIS to Archive processed files

Posted on 2012-03-16
4
Medium Priority
?
352 Views
Last Modified: 2012-03-16
Ok, lots of progress on the last solution.  I have the flow working now properly.  I am pulling multiple flatfiles from ftp, processing them, appending them to table in db.  Now I need to archive all the files that are processed with a FOREACH LOOP CONTAINER.  This is where I am stuck.

I have searched various things and have not found a working solution yet.  Any assistance is most appreciated.  

Here is a diagram of the working flow.

Working FLlow
0
Comment
Question by:pskeens
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 2000 total points
ID: 37730249
Add a ForEach Loop Container component in your SSIS project

Edit it and in the ForEchLoop Editor select Collection

Specifify Foreach File Enumerator as the Enumerator

Specify the name of an already created String variable in Variable Mappings

Insert a File System Task component into the center of the above ForEach loop container

Set the File System Task operation to Move File

Set IsSourcePathVriable = True

Set SourceVariable to the variable specified in Variable Mappings in ForEach Loop container
0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 37730263
In the FileEnumerator specify the folder in where the files to be archived exist

In the File System Task specifiy the Destination to where the files should be archived
0
 
LVL 2

Author Comment

by:pskeens
ID: 37731090
Ok, I have the FOREACH lOOP CONTAINER setup.  The job works all the way through without errors, however the files do not get moved to the Archived Folder.

Here is an image of the current flow:

New Flow
I got this warning even though it executed:

"Warning: The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty."
0
 
LVL 2

Author Comment

by:pskeens
ID: 37731230
GOT IT!   I just went back and checked all the variable paths again and it started working.  I must have had an extra space or dash in the qualifier perhaps.  

Thanks for the assistance!!
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question