Topic ""option confirm off" to"

Author Message
[View user's profile]

Joined: 2017-01-11
Posts: 1
Hello, before writing I tried to understand the forum but did not succeed. Forgive me. I have implemented this code in

                          Dim session As New Session
                               ' Upload files options
                               Dim transferOptions As New TransferOptions
                               transferOptions.TransferMode = TransferMode.Binary
                               ' Setup session options
                               Dim sessionOptions As New SessionOptions
                               With sessionOptions
                                   .Protocol = remote.Protocol
                                   .HostName = remote.HostName
                                   .UserName = remote.UserName
                                   .Password = remote.Password
                                   .PortNumber = remote.PortNumber
                                   .GiveUpSecurityAndAcceptAnySshHostKey = remote.GiveUpSecurityAndAcceptAnySshHostKey
                                   .SshHostKeyFingerprint = remote.SshHostKeyFingerprint
                                   .TimeoutInMilliseconds = 4 * 60 * 1000 ' min * sec * millisec
                                   .Timeout = TimeSpan.FromMinutes(4)
                               End With
                               ' Will continuously report console
                               AddHandler session.OutputDataReceived, AddressOf OutputDataReceived
                               ' Will continuously report progress of synchronization
                               AddHandler session.FileTransferred, AddressOf FileTransferred
                               ' Connect
                               ' Synchronize files
                               Dim synchronizationResult As SynchronizationResult
                               synchronizationResult = session.SynchronizeDirectories(SynchronizationMode.Remote, local_path, remote_path, False, True, SynchronizationCriteria.Time)
                               ' Throw on any error
                               Log("End syncronize", "SUCCESS", Color.Green)
                           Catch _e As Exception
                               Log(_e.Message, "ALERT", Color.Red)
                           End Try

In every way I have tried to bypass the error when a file is not synchronized. But unfortunately I can not understand the command to be set to simulate the "option batch on" and "option confirm off". So unfortunately I get the error:

10/01/2017 18:47:32 - INFO - File or folder '***\import_list_rows_917613.txt' does not exist.
10/01/2017 18:47:32 - INFO - System Error.  Code: 2.
10/01/2017 18:47:32 - INFO - Impossibile trovare il file specificato
10/01/2017 18:47:37 - INFO - (A)bort, (R)etry, (S)kip, Ski(p) all: Abort
10/01/2017 18:49:45 - ALERT - Timeout waiting for WinSCP to respond

help me please Sad
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25310
Location: Prague, Czechia
Sorry, I do not understand your question.
What is that problem? The synchronization does not work at all? Or do you want to ignore occasional errors somehow? What errors?

I wish I'd skip as the default operation
no abort Sad
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25310
Location: Prague, Czechia
How can you get "File or folder '***\import_list_rows_917613.txt' does not exist." during synchronization? Does the file disappear during the operation?

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License