SynchronizeDirectories Path Error
Hi folks.
Hoping someone can point me in the right direction:
Running SynchronizeDirectories in a .net app and for the life of me, I can't get past this error:
"Error listing directory \u0027/C:/Users/REMOVED/data/UAT/SOMETHING\\*.*\u0027.\r\nError retrieving file list for \"/C:/Users/REMOVED/data/UAT/SOMETHING\\*.*\".\r\nSystem Error. Code: 123.\r\nThe filename, directory name, or volume label syntax is incorrect"
The thing is, I am copying the remote path directly from the GUI in WinSCP.
I have tried just about any combination of characters. User has permission - obviously can verify with the GUI.
Code (snippet) is:
basically straight from the sample code.
Any suggestions greatly appreciated.
Cheers,
Rob
Hoping someone can point me in the right direction:
Running SynchronizeDirectories in a .net app and for the life of me, I can't get past this error:
"Error listing directory \u0027/C:/Users/REMOVED/data/UAT/SOMETHING\\*.*\u0027.\r\nError retrieving file list for \"/C:/Users/REMOVED/data/UAT/SOMETHING\\*.*\".\r\nSystem Error. Code: 123.\r\nThe filename, directory name, or volume label syntax is incorrect"
The thing is, I am copying the remote path directly from the GUI in WinSCP.
I have tried just about any combination of characters. User has permission - obviously can verify with the GUI.
Code (snippet) is:
sessionOptions = new SessionOptions { Protocol = Protocol.Sftp, HostName = Config.host,// "example.com", UserName = Config.username, // "user", Password = Config.password, // "mypassword", SshHostKeyFingerprint = Config.sslcert //= "ssh-rsa 2048 xxxxxxxxxxx...=" }; using (Session session = new Session()) { // Will continuously report progress of synchronization session.FileTransferred += FileTransferred; // Connect session.Open(sessionOptions); // Synchronize files SynchronizationResult synchronizationResult; synchronizationResult = session.SynchronizeDirectories( SynchronizationMode.Remote, Config.remotepath, Config.localpath, false, false, SynchronizationCriteria.Time); // Throw on any error synchronizationResult.Check();
basically straight from the sample code.
Any suggestions greatly appreciated.
Cheers,
Rob