SendFile method

SendFile

Transfers one or more files from a local PC to the FTP server.

Syntax

Object.SendFile strLocalFile, strRemoteFile [, type] [, disp]

Arguments

strLocalFile

Argument type: String, Required

Specifies a local file. This string can contain PC wildcard characters (to transfer multiple files).

strRemoteFile

Argument type: String, Required

Specifies a file on the FTP server. This string cannot contain wildcard characters. If this string is an empty string (""), the local file name is used to generate the file name on the FTP server.

Note: If you are connected to a VMS host, fully qualified path names are not supported. For these hosts, use SetCurrentDirectory to specify a host location.
If the parameter, strLocalFile, contains PC wildcard characters, this parameter should be an empty string ("").

type

Argument type: Enumeration, Optional

Specifies what type of file is being transferred. The possible values are rcAscii (0), rcBinary (1), and rcSmart (3).

disp

Argument type: Enumeration, Optional

Specifies what to do if the received file already exists on the FTP server. Currently, it is always rcOverwrite (=1)

Remarks

Files transferred with extensions, .txt;.asp;.ini;.htm;.html;.xml, will be transferred as text (rcAscii) and all others will be transferred as binary (rcBinary).