• I have had great success on using this many times. You may want to make the following change and try it.

    Also make sure that you put your variables in the ReadWriteVaraibles on your script task.

    Public Sub Main()

    'Load global variables with values

    Dts.Variables("PathToBatch_bat").Value = "c:\psftp\psftp.bat"

    Dts.Variables("PathToPsftp_exe").Value = "c:\psftp\psftp.exe"

    Dts.Variables("PathToScript_sc").Value = "c:\psftp\script.sc"

    Dts.Variables("ServerName").Value = "sftp.server_name.domain"

    Dts.Variables("ServerUserName").Value = "username"

    Dts.Variables("ServerPassword").Value = "password"

    Dts.Variables("ServerSubdirectory").Value = "/sftp" --change this to "sftp" (if root folder, just leave as ""

    Dts.Variables("SourceSubdirectory").Value = "C:\psftp\Test.csv"

    Dts.TaskResult = ScriptResults.Success

    End Sub

    End Class