Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rwaldron
Posting Yak Master
131 Posts |
Posted - 2009-08-10 : 10:52:39
|
Hi all..Yep this sounds easy enough but I am having trouble..SSISI want to read files from a folder eg ord123 (no file ext.)For each file found I want to attach it to an email and sendI then want to move the file to another location.So in SSIS I added a For each loop container.In the collection of the For each loop I set my target folder and set files to ord*.I then tick retrieve fully qualified filename.I have a variable created called FileWeJustFound.I add a send mail task.In expressions I use FileAttachements = @[User::FileWeJustFound]When I test this it works great..Each file found gets emailed to an address....My problem is ..Now I want to move the file from its current folder to another folder.So I use a File System task..But I now need to use this with ANOTHER For each loop ?I'm just confused about how I know move the file to another folder.Is this now a nested for each loop I need.Please help..Ray.. |
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-08-12 : 13:11:01
|
You don't need another loop.Add the FileSytem Task into the first loop, after the email task. Use @[User::FileWeJustFound] as the SourceFileName in the FileSytem task. |
 |
|
|
|
|