>IF NOT ThisForm.Ftp.Logon(lcIp,lcUserName,lcPassword)
> WAIT WINDOW 'Unable to login: '+STR(ThisForm.Ftp.ErrorNumber)
> RETURN
>ENDIF
>WAIT WINDOW 'Login done, transfer in progress...' NOWAIT
>ThisForm.Timer.Enabled=.T.
>=Thisform.Ftp.SendFile(2,lcSourceFileName,lcDestinationFileName)
>ThisForm.Timer.Enabled=.F.
>IF ThisForm.Ftp.ErrorNumber>0
> WAIT WINDOW 'Unable to transfer: '+STR(ThisForm.Ftp.ErrorNumber)
>ENDIF
>WAIT WINDOW 'Transfer completed' NOWAIT
>IF NOT ThisForm.Ftp.Logoff()
> WAIT WINDOW 'Unable to logoff'
>ENDIF
I forgot to say that I've put a timer object on the form to display the number of transferred bytes during the transfer. That's why I'm activating it before the send and deactivating it after. The only problem is that Marbry's FTP OCX does not allow any other interaction while doing the send. They are gonna release another version which will allow us to do that. Right now, keeping this code as it is will not change anything unless you upgrade the FTP OCX when it'll become available. For me, right now, this does the job and I am satisfy of it.