====== FTPGETFILE Function ====== ==== Description ==== Retrieves a file from an FTP server. ==== Syntax ==== filecontents = FTPGETFILE(ftpdomain,user,password,path,filename,error) ==== Parameters ==== The function has the following parameters: ^Parameter^Description^ |ftpdomain|The domain name of the FTP site.| |user|A valid user of the FTP site| |password|The password of the user| |path|The location of the file to retrieve| |filename|The name of the file to retrieve| |error|Error status returned by function|| ==== Returns ==== The contents of the file retrieved ==== See Also ==== FTPDELFILE ==== Example ==== declare function ftpgetfile, msg, utility ftpdomain = 'my.ftp.site.com' user = 'someone' password = 'a valid password' path = 'myFtpFiles' filename = 'How_To_FTP' filecontents = ftpgetfile(ftpdomain,user,password,path,filename,error) if filecontents then swap char(13):char(10) with '' in filecontents msg(@window,filecontents) end else if error then x = msg(@window, 'Contents of Error: ':error) end else x = msg(@window, 'No file returned') end end