Imports Limilabs.FTP.Client

Module Module1

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

            ' select the desired folder 
            client.ChangeFolder("path")

            ' retrieve and display the list of files and directories 
            Dim list As List(Of FtpItem) = client.GetList()

            For Each item As FtpItem In list
                Console.Write(item.ModifyDate.ToString())
                Console.Write(item.Size.ToString().PadLeft(10, " "c))
                If item.IsFolder = True Then
                    Console.Write(" [{0}]", item.Name)
                Else
                    Console.Write(" {0}", item.Name)
                End If
                Console.WriteLine()
            Next
            client.Close()
        End Using
        Console.ReadKey()
    End Sub

End Module
