Deletes a file on the FTP server.
numeric - Windows API or WinInet API error code. 0 - on success, other on failure
The filename to delete on the server. This filename can include a FTP server relative path such as "/uploads/somefile.txt". No wildcards are allowed.
This method requires that you manually call FTPConnect and FTPClose to open and close the FTP session.
In order to delete files you have to have the appropriate rights on the server.
oFTP = CREATE("wwFTP") oFTP.FTPConnect("ftp.west-wind.com","jdoe","hispassword") IF oFTP.DeleteFile("/uploads/somefile.txt") # 0 ? oFTP.cErrorMsg RETURN ENDIF ? "File deleted..." oFTP.FTPClose()
See also:Class wwftp | wwFTP::FTPConnect
Comment or report problem with topic