Lesson 9 File.Exists returns false everytime
I was trying to implement the lesson 9 video example and can't get file.exists function to work. I added import system.IO and set "strFileName" to C:\SSISProjects\Data\Lesson9.txt and change permissions to allow SSIS service acct to access this directory and file but function always returns false.
Public Sub Main()
'
' Add your code here
' MsgBox(Dts.Variables("strFileName").Value)
If File.Exists(Dts.Variables("strFileName").Value) Then
Dts.Variables("bolFileExists").Value = True
Else
Dts.Variables("bolFileExists").Value = False
End If
MsgBox(Dts.Variables("bolFileExists").Value)
'
Dts.TaskResult = ScriptResults.Success
End Sub
|