Solved

Need LoopForEach function for SSIS to Archive processed files

Posted on 2012-03-16
4
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MSSQL Query for Selecting the SUM of a Specific Group 2 37
Incorrect syntax near the keyword 'INNER' 3 37
When are cursors useful? 8 61
sql server query 9 26
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

734 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