Sends a file to the server on an already open connection. Make sure you have called
FtpOpenConnection() before calling this method.
0 for success, -1 for failure
The local file to send to the server.
The remote file name to send the file to. Path has to be a server root based (ie.
/root/subfolder/file.txt) rather than a current directory based path.
loFtp = CREATEOBJECT("wwSftp") loFtp.cFtpServer ="127.0.0.1" loFtp.nFtpPort = 23 loFtp.cUsername = "tester" loFtp.cPassword = "password" lcSourceFile = ".\tests\sailbig.jpg" lcTargetFile = "/SubFolder/Sailbig.jpg" lcTargetFile = STRTRAN(lcTargetFile,".jpg","_" + TRANSFORM(SECONDS())+ ".jpg") loFtp.FtpConnect() lnResult = loFtp.FtpSendFileEx(lcSourceFile,lcTargetFile) loFtp.FtpClose()
See also:Class wwSFTP
Comment or report problem with topic