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