Description

Deletes a file on an FTP server.

Syntax

filecontents = FTPDELFILE (ftpdomain, user, password, path, filename, error)

Parameters

The function has the following parameters:

ParameterDescription
ftpdomainThe domain name of the FTP site.
userA valid user of the FTP site
passwordThe password of the user
pathThe location of the file to be deleted
filenameThe name of the file to delete
errorError status returned by function

See also

FTPGETFILE

Example

declare function ftpdelfile, msg, utility
 
ftpdomain = 'my.ftp.site.com'
user = 'someone'
password = 'a valid password'
path = 'myFtpFiles'
filename = 'How_To_FTP'
 
filecontents = ftpdelfile(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, 'File Not Deleted')
   end
end
  • No labels