Xbasic
INET::SFTPSendFile Method
Syntax
.SendFile as L (SourceFile as C, TargetFile as C)
Arguments
- SourceFileCharacter
The file to send.
- TargetFileCharacter
The target file name.
Returns
- resultLogical
Returns .t. if the operation succeed. Otherwise, returns .f.. If an error occurred, the INET::SFTP CallResult property will contain more information.
Description
Send a file to the server. Contents are sent as binary.
Example
dim sftp as INET::SFTP sftp.ServerHost = "ftp.myserver.com" sftp.UserName = "Fred" sftp.Password = "Secret" if sftp.SendFile("myData.csv","target.csv") <> .t. ' error msg = sftp.callResult.error ... end if