Back to product page

AppendFileFrom method


Appends to file on the server, starting from specified local position.

Type

None

Syntax

  • Basic
object.AppendFileFrom [LocalFile], [RemotePath], [LocalPos]
The AppendFileFrom(object,LocalFile,RemotePath,LocalPos) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
LocalFileOptional. A Variant value. Full path to filename on your local disk.
RemotePathOptional. A Variant value. Full path to filename where local file will be copied on server.
LocalPosOptional. A Variant value. Local position from where should append start.

Remarks

AppendFileFrom method will initiate copying of file residing on local computer to remote server you connected to, by appending to the end of remote file. During the transfer, Progress event will be fired several times, depending on your network speed and length of the file. When the copying is completed, Done event will be fired. Transfer will start from local file position specified by LocalPos argument.

AppendFileFrom cannot be used when Resume property is set to True.

If an error occurs during transfer, Done event will be fired immediately containing ErrorCode and description for the error, and transfer will be aborted. This method can be initiated only when State property is set to Connected. You cannot send file if wodFtpDLX is busy doing something else.

Although LocalFile argument MUST contain full path including filename of the file you wish to send, you can omit RemotePath argument. For instance, you can set
 
RemotePath = "/tmp"
 

in which case wodFtpDLX will automatically copy it with the same name as it is locally. If you wish to specify that is copied with some other name, you have to include it in RemotePath argument.

If you don't specify LocalFile or RemotePath argument, wodFtpDLX will use values set in LocalPath and RemotePath properties.

No wildcards can be used for RemotePath argument. RFC protocol specifications for FTP or SFTP do not allow them.

Do not forget that RemotePath should always specify full absolute path (i.e. /home/joe/something) instead of relative path (i.e. joe/something). LocalFile should also specify full path (i.e. C:\home\joe\something) instead of relative path (i.e. joe\something).

Platforms

Windows