Back to product page

AppendData method


Appends data from a string variable to a remote file.

Type

None

Syntax

  • Basic
object.AppendData Data, [RemoteFile]
The AppendData(object,Data,RemoteFile) 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.
RemoteFileOptional. A Variant value. Full path to a file on the server.

Remarks

Unlike the AppendFile method that appends the contents of a local file to the server, AppendData will append the contents of a Data variable to the specified file on the server. This is very useful feature for small files that are stored in local variables in your programs. Although there is no size limit on sending data to the server this way, you should try to limit data to 64kb - this will depend on how much data your programming environment is able to store in a String variable.

What will AppendData do for you? It will copy the contents of a specified variable to a temporary file on disk (in the temporary folder) and then append 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, make sure the Guest user has sufficient privileges to create temporary files.

Once this temporary file is sent to the server, it will be deleted from the local disk.

Platforms

Windows