Imports Limilabs.FTP.Client

Module Module1

    Sub Main()
        Using client As New Ftp()
            client.Connect("ftp.example.org")
            client.Login("username", "password")

            ' determine current folder 
            Console.WriteLine("Current folder: {0}", client.GetCurrentFolder())

            ' create the 'top' folder at the root level 
            client.CreateFolder("/top")

            ' create the 'first' folder in the '/top' folder 
            client.CreateFolder("/top/first")

            ' change the current folder to '/top' 
            client.ChangeFolder("/top")

            ' create the 'second' folder in the current folder, we use relative path this time
            client.CreateFolder("second")

            ' delete the 'first' and 'second' folders we created earlier 
            client.DeleteFolder("first")
            client.DeleteFolder("second")

            ' change the current folder to a parent
            client.ChangeFolderUp()

            client.DeleteFolder("top")

            client.Close()
        End Using
    End Sub

End Module
