NET FTP Library
SendRawFTP(String) Method
Example 






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

Parameters

command
The command to send

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 raw  FTP command to get a directory listing
string result = "";
result= ftp.SendRawFTP("NLST");
 
System.Console.WriteLine("Issuing 'NLST' returned {0}", result);
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 raw  FTP command to get a directory listing
Dim result As String = ""
result= ftp.SendRawFTP("NLST")
 
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