Xceed FTP Library Documentation
SendFile method (XceedQuickFTP)
XceedQuickFtp control reference > SendFile method (XceedQuickFTP)

Description

Connects to an FTP server, sends a file, then disconnects from the FTP server.

Parameters 

Parameter Description
sServerAddress  The IP address or host name of the FTP server to connect to.
lServerPort  The IP port that the FTP server is listening on (usually 21).
sUserName  The username to log in (usually "anonymous").
sPassword  The password (for anonymous users, usually "guest").
sLocalFilename  The path and filename of the file to send to the FTP server.
sRemoteFilename  The file to create on the FTP server. You should specify a path and filename. The path and filename can be relative to the logged in user’s default folder, or can be an absolute path on the remote system.
bAsciiTransfer  Set to True to send the file in ASCII mode, or False to send the file in binary mode.

Examples

Visual Basic Copy Code

XceedQuickFtp1.SendFile("ftp.myserver.com",21,"jacob","secret",_
                        
"c:\send\bio.zip", "/texts/bio.zip", False)

Delphi Copy Code
XceedQuickFtp1.SendFile('10.18.102.93',21,'anonymous','guest',
                        '\\Server\Temp\readme.txt', 'readme.txt', True)

ATL example

Declaration  

HRESULT SendFile
(
[in] BSTR sServerAddress, 
[in] long lServerPort, 
[in] BSTR sUserName, 
[in] BSTR sPassword, 
[in] BSTR sLocalFilename, 
[in] BSTR sRemoteFilename, 
[in] VARIANT_BOOL bAsciiTransfer
); 

Applicable properties

None (The XceedQuickFtp object doesn't have any properties)

Events triggered

None (The XceedQuickFtp object doesn't have any events)