• if you want to go down the path of looping through a folder and checking file sizes, there are two steps to add to your package. (I like this idea, as you mentioned, because then you do not need the 7 variables and 7 script tasks)

    First is add the for each loop container which uses the Foeach File Enumerator and returns the Fully Qualified path to a variable, which I setup as FilePath

    Then, inside of the ForEach Loop, I have a script task with the following code (pass in the FilePath as a ReadOnly variable):

    Imports Microsoft.SqlServer.Dts.Runtime

    Imports System.IO

    Public Class ScriptMain

    Public Sub Main()

    Try

    Dim ofile As New FileInfo(Dts.Variables("FilePath").Value.ToString)

    ' Check size of file, if 0 then delete

    If ofile.Length = 0 Then

    File.Delete(Dts.Variables("FilePath").Value.ToString)

    End If

    Dts.TaskResult = Dts.Results.Success

    Catch

    Dts.TaskResult = Dts.Results.Success

    End Try

    End Sub

    End Class