FTPLIST Function

Retrieve a list of files from an FTP server.

list = FTPLIST(ftpdomain,user,password,path,error)

The function has the following parameters:

ParameterDescription
ftpdomainThe domain of the FTP site.
userA valid username of the FTP site.
passwordThe password of the user.
pathThe location of the files to be listed.
errorThe error status returned by the function.

A field mark (@fm) delimited list of files and file attributes.

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
  • guides/programming/programmers_reference_manual/ftplist.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1