October 27, 2008 at 11:16 pm
Hi, I've created a foreach loop container, in the 'Collection' tab I specified the enumerator, the folder from which to delete (the path) , and a fie mask (sms_*.csv) to specify the files that I intend to delete.
In the Variable Mappings tab I stored the enumerated filename in a pre-created variable. The index is 0 and after that I have wired up the File System task selecting the value "Delete File" in the operation field and I've set up the IsSourcePathVariable to True and selecting my variable in the "SourceVariable" field. The loop is working but just deletes the recent file in the directory, not all files present in that folder like i've specified (sms_*.csv.
Why is this so? please help.
Thanks
.
October 28, 2008 at 7:00 am
Have you verified that the data in the variable is changing as you expect in the loop? You can use a script component with a MEssageBox to show the value in the variable.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 29, 2008 at 9:52 pm
Thanks Jack, problem solved! I didn't put the delete task inside the container! 🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply