<<

Contents

Search

>>

 

FTP_GETFILEINFO$

 

 

Function

 

 

Syntax:

FTP_GETFILEINFO$(<Host>, <Username>, <Password>, <Path>, <Files>, <Separator>, <Filetype>, <Infotype>, <Subdirectories>)

 

<Host>

= <STRING-EXPRESSION>

<Username>

= <STRING-EXPRESSION>

<Password>

= <STRING-EXPRESSION>

<Path>

= <STRING-EXPRESSION>

<Files>

= <STRING-EXPRESSION>

<Separator>

= <STRING-EXPRESSION>

<Filetype>

= <NUM-EXPRESSION>

<Infotype>

= <NUM-EXPRESSION>

<Subdirectories>

= <NUM-EXPRESSION>

 

 

Meaning:

Returns information about files on a FTP server.

 

FTP_GETFILEINFO$ returns as result all found filenames and directory names (maybe incl. file length) with complete path. The single results are separated by <Separator> in the returned string. If no files are found, GET_FILEINFO$ returns the empty string "".

 

If an error occurs, FTP_GETFILEINFO$ returns the empty string "" and ERRORTEXT$ contains the error report.

 

Parameter:

Host

Name of FTP server

Username

Username for access to <Host>

Password

Password for access to <Host>

Path

Specifies the directory in which the <Files> are to be found.

Files

Specifies the files from which the file information is to be got. (e.g. *.zip).

Separator

The first character of <Separator> specifies which character is to separate the names from each other in the returned string. If <Separator> is the empty string "", the semi-colon ";" is the separator.

Filetype

Specifies the files to be found:

=1: only files, no directory names

=2: only directory names, no files

otherwise: files and directories

Infotype

Specifies which information is to be given in the result:

=1: filenames with complete path

otherwise: filename and file length separated by <Separator>

Subdirectories

<>0: All subdirectories of <Path> are searched as well.

=0: Only the directory <Path> is searched.

 

Sample:

HOST$ = "www.xxx.de"

USERNAME$ = "user1"

PASSWORT$ = "passwort1"

 

H% = FTP_GETFILEINFO$(HOST$,USERNAME$,PASSWORT$,

                      "/sub","*.zip",";",1,1,1)

 

See also:

FTP_DELETEFILE

FTP_GETFILE

FTP_PUTFILE

GET_FILEINFO$