MYSCP Online Help Prev Next
What is MySCP
License
Properties
AbsentKeyPolicy
Compression
DifferentKeyPolicy
Error
Status
Timeout
Events
OnAbsentFingerprint
OnAuthorization
OnConnect
OnDifferentFingerprint
OnDisconnect
OnProcessFile
OnError
Methods
DisconnectNow
ReceiveFile
SendFile
WaitForComplete

SendFile

Sub SendFile (Host As String, Port As Integer, Login As String, Password As String, Source As String, Destination As String)

This function transfer one or more files to the remote system. You can specify one or more files to transfer. If you specify a directory, the whole directory will be transferred to the remote system recursively with preserving the structure.

If key file is specified, MySCP will try to authorize using this public key. As a passphrase for the key it will use given Password. If authorization with key will fail, it will try to authorize using usual login/password scheme.

SendFile works asynchronously. This means it returns immediately after you called it. The actual file transfer runs in the separate thread. When transfer completed, the corresponding error code is set in the Error property. You can wait until competition of the task with function WaitForComplete of do something useful in your application. You can also check the Status property. When it is set to STATUS_NOTCONNECTED check the Error property and see if the transmission was completed successfully. You can also use events and find if the transmission was successful by analyzing Error property in the OnDisconnect event.

This HTML Help has been published using the chm2web software.