Hi In a package i have a script task to check if a file exists or not and then based on the conditions to process the package
Public Sub Main() ' ' Add your code here Dim di As DirectoryInfo = New DirectoryInfo("F:\") Dim fi As FileInfo() = di.GetFiles("MarionCT*.TXT") If fi.Length > 0 Then Dts.Variables("User::ODDYSEYSourceFilesExist").Value = True Else Dts.Variables("User::ODDYSEYSourceFilesExist").Value = False End If Dts.TaskResult = ScriptResults.Success End Sub
But I'm getting the below errors:
Error 1 Type 'DirectoryInfo' is not defined.
Error 2 Type 'FileInfo' is not defined.
Where should i define?
Thanks
SV