WITH THISFORM.OleControl1 && ajust the name OleControl1 if necessary !!! .URL = "https://onedrive.live.com/?id=root&cid=DD134DEA9ECW50DE" .UserName = "myhouse@hotmail.com" .PassWord = "a123456" .Protocol = 2 && 2 = FTP protocol .RequestTimeOut = 10 && time out in seconds _VFP.AutoYield = .F. DO WHILE .StillExecuting DOEVENTS ENDDO _VFP.AutoYield = .T. IF .ResponseCode != 0 MESSAGEBOX( "FTP-Error: " + ALLTRIM( STR( .ResponseCode ) ) + " - " + .ResponseInfo ) ENDIF ENDWITH *--------------------------------------------------------------------- WITH THISFORM.OleControl1 srcFile = "c:\xls\daily.xlsx" && local source file desFile = "daily.xlsx" && remote destination file .Execute( , "PUT " + srcFile + " " + desFile) _VFP.AutoYield = .F. DO WHILE .StillExecuting DOEVENTS ENDDO _VFP.AutoYield = .T. IF .ResponseCode != 0 MESSAGEBOX( "FTP-Error: " + ALLTRIM( STR( .ResponseCode ) ) + " - " + .ResponseInfo ) ENDIF ENDWITH *---------------------------------------------------------------------------------------- WITH THISFORM.OleControl1 .Execute( , "CLOSE" ) _VFP.AutoYield = .F. DO WHILE .StillExecuting DOEVENTS ENDDO _VFP.AutoYield = .T. IF .ResponseCode != 0 MESSAGEBOX( "FTP-Error: " + ALLTRIM( STR( .ResponseCode ) ) + " - " + .ResponseInfo ) ENDIF ENDWITHWhen I run above codes the it show error message
.Execute( , "PUT " + srcFile + " " + desFile)Could some one please me what I am doing wrong.