• There's also a tweak I would make to eliminate a (very small) chance of failure if the file is put out there literally at the last second. Change

    ...

    If Now() >= NewDT Then

    Dts.TaskResult = ScriptResults.Failure

    Else

    Dts.TaskResult = ScriptResults.Success

    End If

    ...

    to

    ...

    If System.IO.File.Exists(Dts.Variables("FlatFileConnection").Value.ToString) Then

    Dts.TaskResult = ScriptResults.Success

    Else

    Dts.TaskResult = ScriptResults.Failure

    End If

    ...

    This way, the success is dependant on the real thing you want to check (i.e, the existence of the file). Otherwise, if the file arrives at the last second or some other performance issue causes the task to run slowly, you may get a failure even with the file out there.