wwFTP::FtpGetFileEx

Retrieves a file from an FTP site a

Retrieves a file from an FTP site and allows trapping the OnFTPBufferUpdate event. This event allows for status information and also cancellation of a download.

o.FtpGetFileEx(lcSourceFile, lcTargetFile)

Return Value

numeric - API error code
API Error result codes can be retrieved with wwGetSystemErrorMsg()


Parameters

cSourceFile
The source file to retrieve from the server. This is a server relative path based on the active directory.

Examples:
somefile.txt
subdir/somefile.txt
subdir/subdir/somefile.txt

cTargetFile
The target file to save it to on the local machine/network.


Remarks

Fires OnFTPBufferUpdate events which you can capture to provide progress information on your download.


Example

o=create("wwFTP")

o.FTPConnect("ftp.west-wind.com")
o.FTPGetFileEx("/downloads/pkzip.exe","c:\temp\pkzip.exe")
o.FTPClose()

See also:

Class wwFtp (deprecated) | wwFTP::OnFTPBufferUpdate |

© West Wind Technologies, 1996-2024 • Updated: 09/06/11
Comment or report problem with topic