September 6, 2009 at 2:41 pm
Hi techies,
I need to create script task to check the source files arrival.
For Ex:
The task should check weather files are present at the path.
If the files are not arrived, it should check repeatedly for few times having interval of time between each check say 10 mins.
finally the mail should be sent stating the files is not arrived.
i am finding it difficult to implement, as i am not good with scripts.
Your input is much appreciated. Please help.
September 6, 2009 at 6:02 pm
You can use System.IO.File.Exists(yourFilePath) to check whether the file you are after exists in the given path. This can be done in a loop with a sleep - System.Threading.Thread.Sleep(yourTimeout).
Note that all of this can be done without a script task. You can use the File System Task to check whether the file exists, a loop container to try a few times, an Execute SQL task to do the sleep (e.g. WAITFOR DELAY '00:00:10') and a Send Mail task to send the email.
September 7, 2009 at 5:21 am
Have you checked File Watcher Task?
September 7, 2009 at 7:17 pm
Sorry I actually don't think the File System Task supports checking if a file exists.
September 7, 2009 at 7:41 pm
September 7, 2009 at 11:58 pm
CozyRoc (9/7/2009)
Paul_J (9/7/2009)
Sorry I actually don't think the File System Task supports checking if a file exists.Paul,
This is the custom File Watcher Task, not the File System Task. And it supports the needed functionality.
Sorry for the confusion, but I was referring to my earlier post where I incorrectly implied that the File *System* Task would support checking file existence.
September 8, 2009 at 12:41 am
Guys many thanks for a quick reply..
Well i definetely try your suggestions.
You guys rock....:-)
Cheers,
Aravind
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply