 |
Properties |
 |
Events |
 |
Methods |
|
ReceiveFile
| Sub ReceiveFile (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 local system. You can
specify one or more files to transfer. If you specify a directory, the whole
directory will be transferred to the local 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.
ReceiveFile 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.
|