Command Method  
 

Send a custom command to the server.

Syntax

object.Command( Command, [Parameters], [Options] )

Parameters

Command
A string which specifies the command to send. Valid commands vary based on the Internet protocol and the type of server that the client is connected to. Consult the protocol standard and/or the technical reference documentation for the server to determine what commands may be issued by a client application.
Parameters
An optional string which specifies one or more parameters to be sent along with the command. If more than one parameter is required, most Internet protocols require that they be separated by a single space character. Consult the protocol standard and/or technical reference documentation for the server to determine what parameters should be provided when issuing a specific command. If no parameters are required for the command, this argument may be omitted.
Options
A numeric value which specifies one or more options. Currently this argument is reserved and should either be omitted, or a value of zero should always be used.

Return Value

A value of zero is returned if the command was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure. To determine the result code returned by the server in response to the command, read the value of the ResultCode property.

Remarks

The Command method sends a command to the server and processes the result code sent back in response to that command. This method can be used to send custom commands to a server to take advantage of features or capabilities that may not be supported internally by the control.

This method should only be used when the application needs to send a custom, site-specific command or send a command that is not directly supported by the control. This method should never be used to issue a command that opens a data channel. If the application needs to transform data as it is being sent or received, and cannot use the GetFile or PutFile methods, then use the OpenFile method to open a data channel with the server.

By default, file names which are sent to the server using the Command method are sent as ANSI characters. If the server supports UTF-8 encoded file names, the Encoding property can be used to specify that file names with non-ASCII characters should be sent as UTF-8 encoded values. It is important to note that this option is only available if the server advertises support for UTF-8 and permits that encoding type.

See Also

Encoding Property, Features Property, ResultCode Property, ResultString Property, OnCommand Event