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
'Renames a directory in the current FTP directory
Dim status As Boolean = ftp.RenameDirectory("TestDir", "newDir")
If status = True Then
ftp.RenameDirectory("newDir", "TestDir")
End If
If status = True Then
System.Console.WriteLine("TestDir has {0} renamed to newDir and back again","been")
Else
System.Console.WriteLine("TestDir has {0} renamed to newDir and back again","not been")
End If