NET FTP Library
CurrentDirectory Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : CurrentDirectory Property
Specifies the current FTP directory.
Syntax
'Declaration
 
Public Property CurrentDirectory As System.String
'Usage
 
Dim instance As FTP
Dim value As System.String
 
instance.CurrentDirectory = value
 
value = instance.CurrentDirectory
public System.string CurrentDirectory {get; set;}
public read-write property CurrentDirectory: System.String; 
public function get,set CurrentDirectory : System.String
public: __property System.string* get_CurrentDirectory();
public: __property void set_CurrentDirectory( 
   System.string* value
);
public:
property System.String^ CurrentDirectory {
   System.String^ get();
   void set (    System.String^ value);
}
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
 
// gets or sets the current directory for the ftp server.
// / represents the root of the ftp file system
ftp.CurrentDirectory = "/";
System.Console.WriteLine("Current directory is {0}", ftp.CurrentDirectory);
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
 
' gets or sets the current directory for the ftp server.
' / represents the root of the ftp file system
ftp.CurrentDirectory = "/"
System.Console.WriteLine("Current directory is {0}", ftp.CurrentDirectory)
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