Hi, just wondering if anyone is using the cnFTP class with success? I'm finding I can do basic file downloads and directory listings but cannot get renaming or deleting to work. Here's an example of the code I'm using for the delete....
mFTPDeleteFile(aServerIP, aUserName, aPassword, ftpFolder, fileName: String): String;
vars
ftp : CnFtp;
result : String;
kc : CnKarmaCntrl;
cc : CnCntrl;
begin
create kc;
cc := app.myCnCntrl;
create ftp transient ;
ftp.setModeAscii(true);
ftp.setServerName(aServerIP) ;
ftp.setUserId(aUserName,aPassword') ;
result := ftp.cnConnect ;
if result <> CN_OK then
return result;
endif;
ftp.emFtpSetCurrentDirectory(ftp.connectionHandle, ftpFolder);
result := ftp.emFtpDeleteFile(ftp.connectionHandle, fileName).String;
ftp.cnCloseSession;
epilog
return result;
delete ftp;
delete kc;
delete cc;
end;
TIA
Willie