SET PROCEDURE TO ftp.prg ADDITIVE #INCLUDE FTP.H loFTP = CREATEOBJECT('ftp_service') IF loFTP.OpenInternet(lcUser,lcPass,lcNode, "21") && connect to FTP Server (user, password, server, port) lcMsg = 'Connect user ' + lcUser + ' on ' + lcNode =WAITSIM(lcMsg) =loFTP.FtpCommand("SITE HELP", FTP_TRANSFER_TYPE_ASCII,0,.NULL.) lcMsg = ALLTRIM(STR(loFTP.GetExtendedErrorCode())) + ' ' + ; ALLTRIM(loFTP.GetExtendedErrorMsg()) =WAITSIM(lcMsg,gnMsgWait) && recfn and if it exist the lrecl command llAllocResult = loFTP.FtpCommand(lcCmd1, FTP_TRANSFER_TYPE_ASCII,0,.NULL.) IF llAllocResult lcMsg = 'Executed ' + lcCmd1 + ' command' =WAITSIM(lcMsg,gnMsgWait) llPutResult = loFTP.PutFTPFile( lcRFile , lcLFile , lnFTPMode ) IF llPutResult lcMsg = "File " + lcLFile + " uploaded as " + lcRFile =WAITSIM(lcMsg,gnMsgWait) ELSE lcMsg = ALLTRIM(STR(loFTP.GetExtendedErrorCode())) + ; ' ' + ALLTRIM(loFTP.GetExtendedErrorMsg()) =WAITSIM(lcMsg,gnMsgWait) lcMsg = 'Could not upload file ' + lcLFile + ' as ' + lcRFile =WAITSIM(lcMsg,gnMsgWait) ENDIF ELSE lcMsg = ALLTRIM(STR(loFTP.GetExtendedErrorCode())) + ; ' ' + ALLTRIM(loFTP.GetExtendedErrorMsg()) =WAITSIM(lcMsg,gnMsgWait) RETURN .F. ENDIF>>>>Thanks for response. The problem is that I also get the error
501 unrecognized SITE command
>>>