NET FTP Library
SendRawFTP(String,Int32) Method
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class > SendRawFTP Method : SendRawFTP(String,Int32) Method
The command to send
Wait for a specific response
Send a raw FTP command
Syntax
'Declaration
 
Public Overloads Function SendRawFTP( _
   ByVal command As System.String, _
   ByVal response As System.Integer _
) As System.String
'Usage
 
Dim instance As FTP
Dim command As System.String
Dim response As System.Integer
Dim value As System.String
 
value = instance.SendRawFTP(command, response)
public System.string SendRawFTP( 
   System.string command,
   System.int response
)
public function SendRawFTP( 
    command: System.String;
    response: System.Integer
): System.String; 
public function SendRawFTP( 
   command : System.String,
   response : System.int
) : System.String;
public: System.string* SendRawFTP( 
   System.string* command,
   System.int response
) 
public:
System.String^ SendRawFTP( 
   System.String^ command,
   System.int response
) 

Parameters

command
The command to send
response
Wait for a specific response

Return Value

The FTP servers response
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
 
//Send a FEAT FTP command to show commands supported by the FTP Server
string result = "";
result= ftp.SendRawFTP("FEAT", 211);
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
'Send a FEAT FTP command to show commands supported by the FTP Server
Dim result As String = ""
result= ftp.SendRawFTP("FEAT", 211)
 
System.Console.WriteLine("Issuing 'NLST' returned {0}", result)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members
Overload List