The function FtpLoad opens a connection to an FTP server, reads the file SrcFile from the server, stores it in the local file DstFile and disconnects from the server. Please note that the parameter SrcFile must contain the full path on the FTP server. The record FTPParams has to contain the access data of the server (see TFTPParams for details).
The function returns the following error codes:
0 ... everything is OK
-2 ... source file not found
-3 ... cannot read file (access error)
-4 ... cannot connect to host (check Host address, credentials and/or internet connection)
-5 ... the FTP server does not recognize one or more particular FTP commands
-6 ... path to DstFile does not exist
-9 ... unspecified error
|