Purpose
Stores a file on an FTP server with the given CFtpConnection handle.
Syntax
MIPutFtpFile( ByVal hConnection As CFtpConnection,
ByVal strLocalFile As String, ByVal strRemoteFile As String,
ByVal dwFlags As Integer )
As SmallInt
hConnection is a CFtpConnection handle.
strLocalFile is a string that contains the name of the file to send from the local system.
strRemoteFile is a string that contains the name of the file to create on the FTP server.
dwFlags specifies the conditions under which the transfer occurs. This parameter can be any of the following values:
dwFlag value | Definition |
---|---|
FTP_TRANSFER_TYPE_ASCII | The file transfers using FTP ASCII (Type A) transfer method. Converts control and formatting information to local equivalents. |
FTP_TRANSFER_TYPE_BINARY | The file transfers data using FTP's Image (Type I) transfer method. The file transfers data exactly as it exists, with no changes. This is the default transfer method. |
Return Value
Nonzero if successful; otherwise 0. To determine the cause of the failure, call the MIGetErrorMessage() function.
Description
Both strRemoteFile and strLocalFile can be either partially qualified file names relative to the current directory, or fully qualified. A backslash (\) or forward slash (/) can be used as the directory separator for either name.