Unlike SSIS , DTS doesn't have any "for each loop " task to loop the files from a folder.
If you have any Jscript task which is looking for a file and failing when there is no file
on the source folder then below steps will help to stop the execution of a dts package
when there is no file exists.
Steps :
1. click on the workflow properties of the task which has to be stop when a file doesn't exist
2. select the checkbox [Use ActiveX script] and click on properties
3.make sure it's a visual basic script language
4. add the below code in the code window above
'********************************************************************** Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(DTSGlobalVariables("varFileName").value) Then else end if End Function |
No comments:
Post a Comment