Back to product page

GetFileAt method


Receives a file from the server, starting at given position.

Type

None

Syntax

  • Basic
object.GetFileAt[LocalPath], [RemoteFile], RemotePos, Size
The GetFileAt(object,LocalPath,RemoteFile,RemotePos,Size) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
LocalPathOptional. A Variant value. Full path to filename (or directory) on your local disk.
RemoteFileOptional. A Variant value. Full path to filename on the server.
RemotePosRequired. A long value. Position in the file at which copying will start.
SizeRequired. A long value. Size of the data to copy locally.

Remarks

GetFileAt method will initiate copying of part of the file residing on remote server to the local computer. 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.

If an error occurs during transfer, Done event will be fired immediately containing ErrorCode and description for the error, and transfer will be aborted. If you want to continue it later, or try to re-receive the file, initiate GetFileAt64 method again (immediately or after reconnecting, depends on error that occurred). You may not use the Resume property with GetFileAt64. To continue reading from the remote file, specify the RemotePos argument, increased by the amount of data that you received in your previous call.

Please read help for GetFile to get more general info about downloading a file.

If Size argument is set to 0 then remote file will be transferred from RemotePos point, up to its end.

If you transfer files larger than 2.4GB use GetFileAt64 method instead.

Platforms

Windows