wwftp::FtpSendFile

This method sends a file to an FTP server by connecting, sending and disconnecting.

This method operates in blocking mode waiting for completion of the file transfer before returning a result code. File properties can either be set with the wwIPStuff properties or by passing the parameters explicitly.

o.FTPSendFile(cServer,cSource,cTarget,cUsername,cPassword)

Return Value

numeric - 0 success anything else: WinInet Error Code

Parameters

cServer
Domain name or IP Address of the FTP server

cSource
Source file name - this is the local filename to send to the server.

cTarget
Target filename - this is the name that the file will be saved as on the server.

cUsername
Optional - FTP Security username. Use a username and password when access to the FTP site is restricted (as it almost always is for file uploads).

cPassword
Optional - FTP Security password.

Example

oIP = CREATEOBJECT("wwFTP")

oIp.FTPSendFile ("ftp.west-wind.com",;
                "c:\uploads\ww_web.zip",;
                "/uploads/ww_web.zip",;
                "bozo",;
                "looser")

See also:

Class wwFtp (deprecated)

© West Wind Technologies, 1996-2024 • Updated: 09/06/11
Comment or report problem with topic