Back to product page

PutDataAt method


Sends data from a string variable to the server, at a specified file position.

Type

None

Syntax

  • Basic
object.PutDataAt Data, RemoteFile, RemotePosLo, RemotePosHi
The PutDataAt(object,Data,RemoteFile,RemotePosLo,RemotePosHi) syntax has these parts:
objectAn expression evaluating to an object of type wodSFTP.
DataRequired. A String value. Represents data that will be stored on the server.
RemoteFileA Variant value. Full path to a file on the server.
RemotePosLoLong value. Low word of remote position.
RemotePosHiLong value. High word of remote position, defaults to 0.

Remarks

Unlike the PutFileAt method that copies part of a local file to the server, PutDataAt will copy the contents of the Data variable to the specified file on the server, at the specified position. This is a very useful feature for small files that are stored in local variables within your programs. Although there is no size limit on sending data to the server in this way, you should try to keep the amount below 64kb. This depends on how much data your programming environment is able to store in a String variable.

What will PutDataAt do for you? It will copy the contents of a specified variable to a temporary file on the disk (in the temporary folder) and then copy that file to the server. Keep in mind that for this method you *MUST* allow the component to write to your disk. If you are using wodSFTP in an environment such as ASP, please ensure that the Guest user has sufficient privileges to create temporary files.

Once the file has been created and sent to the server it will be deleted from the local disk.

Platforms

Windows