SynchronizationMode Local with FileMask
HI i'am trying to automate sync. process of my local directory for .txt file only. but i'm having this error when trying to used the TransferOptions. help me pls.
WinSCP.Session.SynchronizeDirectories(WinSCP.SynchronizationMode, string, string, bool, bool, WinSCP.SynchronizationCriteria, WinSCP.TransferOptions)' has some invalid arguments
private void buttonReportsData_Click(object sender, EventArgs e) { label1.Visible = true; try { // Setup session options SessionOptions sessionOptions = new SessionOptions { Protocol = Protocol.Ftp, HostName = "000.000.0.00", UserName = "HomeBoy", Password = "1234567", }; using (Session session = new Session()) { // Will continuously report progress of synchronization //session.FileTransferred += FileTransferred; // Connect session.Open(sessionOptions); while (true) { //string filemask = "*.txt"; buttonReportsData.BackColor = Color.DarkSeaGreen; buttonReportsData.Text = "Sync-Started"; label1.Text = "FTP Sync process Started"; TransferOptions transOp = new TransferOptions(); transOp.FileMask = "*.txt"; transOp.TransferMode = TransferMode.Automatic; // Synchronize files SynchronizationResult synchronizationResult; synchronizationResult = session.SynchronizeDirectories( SynchronizationMode.Local, @"C:\temp", "/folder1", false, transOp); // Throw on any error synchronizationResult.Check(); } } } ... }