![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello! I have this ActiveX script, I need to pass these two files names check and if they exist before I move onto a next dts task, but I am having trouble checking both within the Main function, is there a way to pass two file names as parameters to a function and have a the the function CheckFile check both, and if both exists go to next DTS_Step CONST FILE1 = "E:\WHC.DATA.FILES\EOM.AVG.DAILY.LOAD\FMSCURRENT.T XT" CONST FILE2 = E:\WHC.DATA.FILES\EOM.AVG.DAILY.LOAD\FMSCOMPLETE.T XT ====================== Function Main() Main = CheckFile(FILE1) "like (FILE1, FILE2)"... End Function Function CheckFile(sFileName) Dim fso Set fso = CreateObject ("Scripting.FileSystemObject") If (fso.FileExists(sFileName)) Then CheckFile = DTSTaskExecResult_Success Else CheckFile = DTSTaskExecResult_Failure End If Set fso = Nothing End Function Any help is highly appreciated!! |
![]() |
| Thread Tools | |
| Display Modes | |
| |