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
GetData method
Retrieves contents of remote file to string variable.
Type
NoneSyntax
- Basic
object.GetData [RemoteFile]
The GetData(object,RemoteFile) syntax has these parts:
The GetData(object,RemoteFile) syntax has these parts:
object | An expression evaluating to an object of type wodSFTP. |
RemoteFile | Optional. A Variant value. Full path to file on the server. |
Remarks
Unlike the GetFile method, that copies a file from the remote server to a local file, GetData will get a file from the server and copy it to the String variable. Once everything is completed and the Done event has fired (as for all other methods), the ListItem property will hold the retrieved data.The GetData method will try to create a temporary file on your local disk, so please ensure that wodSFTP has sufficient privileges to do this. In ASP (and other similar environments), wodSFTP usually runs as the Guest user, which may not have sufficient privileges to perform this operation. In this case it will fail with an error (Could not create temporary file).
In ASP we advise that you make the call as follows:
Sftp1.GetData CStr(RemoteFile)
This will ensure that wodSFTP can read the optional string parameter correctly.