Solved

Need LoopForEach function for SSIS to Archive processed files

Posted on 2012-03-16
4
348 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

617 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