April 6, 2009 at 3:11 pm
ok
do you have an SSIS example code that i can download and learn from how to do it?
April 6, 2009 at 5:02 pm
I'd probably do it all in a Script Task. I'm not a big fan of sticking in Script Tasks to increment variables and stuff.
April 7, 2009 at 6:13 am
Hi,
I think one of the earlier posters may have mentioned this already.
Use a For Each container to enumerate through the folder. It will execute whatever task is placed within the container each time it finds an item in the enumeration.
In the case of the file enumerator, it will not execute the task if there are no files that match the filemask. This will prevent the errors you mentioned.
Therefore the easiest way to achieve what you're after is a for each file enumerator with a file system move task inside it.
HTH
Kindest Regards,
Frank Bazan
April 8, 2009 at 10:31 am
Peleg,
I second Alvin's suggestion and have had success with this approach.
http://rafael-salas.blogspot.com/2007/03/ssis-file-system-task-move-and-rename.html
Matt
April 12, 2009 at 8:36 am
Alvin - i have tried out to do the same as :
http://rafael-salas.blogspot.com/2007/03/ssis-file-system-task-move-and-rename.html
and i have some problems :
1)how do i add a variable as you suggested, that will count the number of files that were moved? (where do i put the code for it,and which code?)
2)i have tried to do as the above code but i get :
"Could not find a part of the path."
while i am sure i put all relevent code
any idea?
Thanks
Peleg
April 12, 2009 at 1:18 pm
You could add a script block inside the Foreach container that increments a variable on each pass.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
April 12, 2009 at 3:39 pm
ok
and when i drag the green arrow to the next step
how can i check there if i can go to the next step if for example the value of the variable is more then 1?how do i access the variable from there?
April 12, 2009 at 3:47 pm
From the drop down box select constraint and expression (I hope that's the correct wording)
In the text box, enter:
@[your_variable] > 0
Replace your_variable with the name of your variable.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 8 posts - 16 through 22 (of 22 total)
You must be logged in to reply to this topic. Login to reply