' Get the root folders contents. Dim folderItems As Object = ftp.GetFolderContents( "", XceedFtpLib.EXFContentsFormat.fcfCollection )
Dim item As XceedFtpLib.XceedFtpFolderItem For Each item in CType( folderItems, XceedFtpLib.XceedFtpFolderItems ) listBox1.Items.Add( item.ItemName ) Next item
' Disconnect from the FTP server ftp.Disconnect() Catch except As System.Runtime.InteropServices.COMException MessageBox.Show( except.ToString() ) End Try