>lparameter cUserId,cPassword,cFtpAddr,cTheFile,cFtpFile,cFtpPath, tlSilentMode >if vartype(m.sz_ftp)#'O' > sz_ftp = newobject('ftp_service',"ftp.prg") >endif > >local lcReturn, lcSetSafety, s >lcReturn=".T." > >lcSetSafety = set('safety') >set safety off >FtpPath = "/rentmast/update/" >cUserId = "michaels" >cPassword = "michaels123" >cFtpAddr = "www.doncasteroffice.net" > >if sz_ftp.OpenInternet(m.cUserId,m.cPassword, m.cFtpAddr, "21") > if !empty(m.cFtpPath) > if !sz_ftp.ChangeFtpDirectory(m.cFtpPath) > s=sz_ftp.GetErrorCode(.t.) > lcReturn=".F.Can not change directory" && Set to false if - Will use this as a check as to whether > endif > endif > cFtpFile = "testfile.txt" > cTheFile = "C:\TEMPRENT\TESTFILE.txt" > if m.lcReturn =".T." > if !sz_ftp.PutFtpFile(m.cFtpFile, m.cTheFile) > lcReturn=".F.Can not put file "+ m.cFtpFile+" on the FTP Site" > else > lcReturn = ".T." > endif > endif > sz_ftp.CloseInternet() >else > if not m.tlSilentMode > =messagebox("No Connection Made", 64, "FTP Message") > endif > sz_ftp.CloseInternet() > lcReturn=".F.No Connection Made" >endif > >release sz_ftp >return m.lcReturnI've tried this code (with my files) and I was able to connect, but this is the error, I got, then tried to put file from d:\My Documents\