Table of Contents

FTPDELDIR Function

Description

Deletes a directory on an FTP server.

Syntax

fptdel = FTPDELDIR(ftpdomain,user,password,parentpath,childpath,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
parentpathThe location of the directory to be deleted
childpathThe name of the directory to delete
errorError status returned by function

Returns

See Also

FTPGETFILE

Example

declare function ftpdelfile, msg, utility

 

ftpdomain = 'my.ftp.site.com'

user = 'someone'

password = 'a valid password'

parentpath = 'myFtpFiles'

childpath = 'How_To_FTP'

 

fptdel = ftpdeldir(ftpdomain,user,password,parentpath,childpath,error)

 

if fptdel then

   swap char(13):char(10) with '' in fptdel

   msg(@window,fptdel)

end else

   if error then

      x = msg(@window, 'Contents of Error: ':error)

   end else

      x = msg(@window, 'File Not Deleted')

   end

end