• I am i doing any mistake hear. I don't know remote path and my file name is pmain.rs.out.x085.ae i have to see the data in that file. when i run the package it is successfully but I am not seeing that file can any one please help me out.

    public void Main()

    {

    try

    {

    // TODO: Add your code here

    ConnectionManager cm = Dts.Connections.Add("FTP");

    //Set the properties like username & password

    //cm.Properties["ServerName"].SetValue(cm, "10.32.130.28"/*Dts.Variables["ftpDropLoc"].Value.ToString()*/);

    cm.Properties["ServerName"].SetValue(cm, "facs.state.mi.us");

    cm.Properties["ServerUserName"].SetValue(cm, "#085AE1");

    cm.Properties["ServerPassword"].SetValue(cm, "MEDC$A12");

    cm.Properties["ServerPort"].SetValue(cm, "21");

    cm.Properties["Timeout"].SetValue(cm, "0");

    //The 0 setting will make it not timeout

    cm.Properties["ChunkSize"].SetValue(cm, "1000");

    //1000 kb

    cm.Properties["Retries"].SetValue(cm, "1");

    //create the FTP object that sends the files and pass it the connection created above.

    FtpClientConnection ftp = new FtpClientConnection(cm.AcquireConnection(null));

    //Connects to the ftp server

    http://ftp.Connect();

    //Build a array of all the file names that is going to be FTP'ed (in this case only one file)

    string[] files = new string[] { @"C:\AMS_FTP_ETL\pmain.rs.out.x085.ae" };

    //files[0] = @"C:\Report1.pdf";//Dts.Variables["fileDropLoc"].Value.ToString();

    //ftp the file

    //Note: I had a hard time finding the remote path directory. I found it by mistake by creating both the FTP connection and task in the SSIS package and it defaulted the remote path setting in the FTP task.

    http://ftp.ReceiveFiles(files, "", true, false);

    // the True makes it overwrite existing file and False is saying that it is not transferring ASCII

    http://ftp.Close();

    }

    catch

    {

    Dts.TaskResult = (int)ScriptResults.Failure;

    }

    Dts.TaskResult = (int)ScriptResults.Success;

    }

    }

    }