wwftp::FTPSendFileEx

Uploads a file to an FTP site with event progress information and the ability to cancel.

o.FtpSendFileEx(lcSourceFile, lcTargetFile)

Return Value

numeric - 0 success anything else: WinInet Error Code

Parameters

cSourceFile
Local file to send to the server. Use a fully qualified path and file name.

cTargetFile
Filename on the server to copy the file to. Path is server relative to the server's current FTP folder.

Examples:
somefile.txt
subdir/somefile.txt
subdir/subdir/somefile.txt

Remarks

You must have rights to write to the FTP directory based on the FTP server permissions. Write permissions are not granted to FTP directories by default, so you have to make sure that you can upload files in the first place. You can check this out with your regular FTP client.

Example

o=create("wwFTP")

o.FTPConnect("ftp.west-wind.com")
o.FTPSendFileEx("c:\temp\pkzip.exe","downloads/pkzip.exe")
o.FTPClose()

See also:

Class wwFtp (deprecated) | wwFTP::OnFTPBufferUpdate | wwFTP::lCancelDownload

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