Xceed FTP Library Documentation
Receiving files (VB.NET example)
Example topics > Receiving files (VB.NET example)
VB.NET Copy Code

'The following example demonstrates how to connect to a
' FTP server and download a file.

Dim ftp As New XceedFtpLib.XceedFtpClass()

ftp.License( "your license key" )

' Specify the FTP server's address
ftp.ServerAddress = "ftp.cdrom.com"

' Specify the username and password to login
ftp.UserName = "anonymous"
ftp.Password = "guest"

Try
' Connect to the FTP server
  ftp.Connect()

   ' Receive files
   ftp.ReceiveFile( "UPLOADS.TXT", 0, "c:\test\uploads.txt" )
   ' Disconnect from the FTP server
ftp.Disconnect()
Catch except As System.Runtime.InteropServices.COMException
   MessageBox.Show( except.ToString() )
End Try