lnRetVal = loFTP.FTPSendFileEx(lcFromPath + lcFileName, ; lcToPath + "/" + JUSTFNAME(lcFileName)) DEFINE CLASS CU_wwFTP AS wwFTP oProgressForm = .NULL. cProgressFormClass = "wwProgressForm" nCurrFileSize = 0 nTotalFiles = 0 nCurrFileIndex = 0 lShowDialog = .F. nTransferType = 0 PROCEDURE OnFTPBufferUpdate LPARAMETER lnBytesDownloaded,lnBufferReads,lcCurrentChunk LOCAL loProgressForm WITH THIS DO CASE CASE lnBufferReads = 1 DO CASE CASE .nCurrFileSize > 90000 .nFTPWorkBufferSize = 16484 CASE .nCurrFileSize > 40000 .nFTPWorkBufferSize = 8182 ENDCASE CASE (lnBufferReads < 0 AND .nCurrFileIndex = .nTotalFiles) .oProgressForm = .NULL. RETURN ENDCASE IF .lShowDialog IF ISNULL(.oProgressForm) .oProgressForm = CREATEOBJECT(.cProgressFormClass) .oProgressForm.SetCaption("File Transfer") .oProgressForm.ShowCancelButton() .oProgressForm.Show() ENDIF .oProgressForm.SetDescription(IIF(.nTransferType = 1, "Received from ", ; "Sent to ") + .cserver + ":" + CHR(13) + ; LTRIM(STR(.nCurrFileIndex)) + " of " + LTRIM(STR(.nTotalFiles)) + ; " file(s) " + CHR(13) + ; LTRIM(TRANSFORM(lnBytesDownloaded,"999,999,999,999")) + " of " + ; LTRIM(TRANSFORM(.nCurrFileSize,"999,999,999,999"))+ " bytes") .oProgressForm.SetProgress(lnBytesDownloaded / .nCurrFileSize * 100) DOEVENTS IF .oProgressForm.lCancelled .lCancelDownload = .T. ENDIF ENDIF ENDWITH ENDPROC ENDDEFINEAny ideas?