FTPLIST Function
Description
Retrieve a list of files from an FTP server.
Syntax
list = FTPLIST(ftpdomain,user,password,path,error)
Parameters
The function has the following parameters:
Parameter | Description | |
---|---|---|
ftpdomain | The domain of the FTP site. | |
user | A valid username of the FTP site. | |
password | The password of the user. | |
path | The location of the files to be listed. | |
error | The error status returned by the function. |
Returns
A field mark (@fm) delimited list of files and file attributes.
Example
declare function ftpgetfile, msg, utility ftpdomain = 'my.ftp.site.com' user = 'someone' password = 'a valid password' path = 'myFtpFiles' filelist = ftplist(ftpdomain,user,password,path,filename,error) if filelist then swap char(13):char(10) with '' in filelist msg(@window,filelist) end else if error then x = msg(@window, 'Contents of Error: ':error) end else x = msg(@window, 'No files returned') end end