Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSFTP
- Methods
- Abort
- About
- AppendData
- AppendFile
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- ExtendedCmd
- GetAttributes
- GetData
- GetDataAt
- GetFile
- GetFileAt
- GetFiles
- ListAttributes
- ListDir
- ListNames
- LoopFiles
- MakeDir
- PutData
- PutDataAt
- PutFile
- PutFileAt
- PutFiles
- RealPath
- RemoteClose
- RemoteOpen
- RemoteRead
- RemoteWrite
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Properties
- Authentication
- Blocking
- BufferSize
- ClientName
- Compression
- Encryption
- EncryptionList
- ErrorText
- Extensions
- FingerPrint
- FIPS
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeySignatureList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- MyHostname
- MyIP
- Notification
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- ServerErrorCode
- ServerErrorText
- State
- StateText
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Events
- Methods
- IwodSFTPNotify
- SftpItem
- SftpItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
RemoteWrite method
Writes to remote file.
Type
NoneSyntax
- Basic
object.RemoteWrite Data, RemotePosLo, RemotePosHi
The RemoteWrite(object,Data,RemotePosLo,RemotePosHi) syntax has these parts:
The RemoteWrite(object,Data,RemotePosLo,RemotePosHi) syntax has these parts:
object | An expression evaluating to an object of type wodSFTP. |
Data | Variant value. Holds data to be written in remote file. |
RemotePosLo | A Long value. Low 32 bit of position in the remote file where write occurs. |
RemotePosHi | A Long value. High 32 bit of position in the remote file where write occurs (usually 0). |
Remarks
The RemoteWrite method write Data to specific position in remote file, opened with RemoteOpen method. When data is fully written, Done event will be fired where you can write more data, close the file etc.. During the transfer, Progress event WILL NOT be fired.Data argument can contain String or Byte Array (SAFEARRAY[VT_UI1] in VC++).
After you finish writing all the data, don't forget to call RemoteClose. You can not call other methods until RemoteClose is called (for example, you cannot call PutFile).
Code sample
- Basic
You can, for example, write data like this:
Dim sftp1 As New wodSFTPCom
sftp1.HostName = "x.y.z"
sftp1.Login = "xyz"
sftp1.Password = "abc"
sftp1.Blocking = True
sftp1.Connect
sftp1.RemoteOpen "/tmp/somefile", True
sftp1.RemoteWrite "this is a test", 0, 0
sftp1.RemoteWrite "another test", 10, 0
sftp1.RemoteClose
sftp1.Disconnect
Dim sftp1 As New wodSFTPCom
sftp1.HostName = "x.y.z"
sftp1.Login = "xyz"
sftp1.Password = "abc"
sftp1.Blocking = True
sftp1.Connect
sftp1.RemoteOpen "/tmp/somefile", True
sftp1.RemoteWrite "this is a test", 0, 0
sftp1.RemoteWrite "another test", 10, 0
sftp1.RemoteClose
sftp1.Disconnect