<<

Contents

Search

>>

 

FTP_GETFILE

 

 

Function

 

 

Syntax:

FTP_GETFILE(<Host>,<Host Filename>,<Username>,<Password>,<Client Filename>,<Progressbar>)

 

<Host>

= <STRING-EXPRESSION>

<Host Filename>

= <STRING-EXPRESSION>

<Username>

= <STRING-EXPRESSION>

<Password>

= <STRING-EXPRESSION>

<Client Filename>

= <STRING-EXPRESSION>

< Progressbar >

= <STRING-EXPRESSION>

 

 

Meaning:

Copies files from a FTP server to the client.

 

<Host Filename> and <Client Filename> can contain several filenames separated by semi-colons.

 

FTP_GETFILE gets the file <Host Filename> from the Server <Host> and saves it at the Client as <Client Filename>.

 

There must be an Internet connection.

 

FTP_GETFILE returns the value 0 if no error occurred, otherwise an error number. In the case of an error ERRORTEXT$ contains the error report.

 

Parameter:

Host

Name of FTP server

Host Filename

Name of  host file. The name must contain a full path. Several filenames can be specified separated by semi-colons.

Username

Username for access to <Host>

Password

Password for access to <Host>

Client Filename

Name of client file. Several filenames can be specified separated by semi-colons.

Progressbar

Contains, separated by ';', the following parameters of the instruction PROGRESSBAR:

 

        <Row>;<Column>;<Length>;<Color1>;<Color2>

 

If at least the parameters <Row>, <Column> and <Length> are specified, a bar shows the work progress just like with the instruction PROGRESSBAR. 

 

 

Sample:

HOST$ = "www.xxx.de"

HOST_FILE$ = "/index.html;/search.html"

CLIENT_FILE$ = "C:\tmp\index.html;C:\tmp\search.html"

USERNAME$ = "user1"

PASSWORT$ = "passwort1"

 

H% = FTP_GETFILE(HOST$,HOST_FILE$,USERNAME$,PASSWORT$,

                 CLIENT_FILE$,“7;10;40“)

IF H% <> 0

THEN ERRORMES = "Error" + STR$(H%) + " " + ERRORTEXT$

ENDIF

 

See also:

FTP_DELETEFILE

FTP_PUTFILE

FTP_GETFILEINFO$

PROGRESSBAR