This topic demonstrates how to receive items from an FTP server using the static Receive method of the QuickFtp class.
Receive method
The Receive method has various overloads that can be used to receive files from a server. Some only require that you specify the hostname, the local destination folder, and the files to receive, while others provide options such as a using username and password, port numbers, authentication, whether to replace existing files, preserve paths, proxies, passive transfers, synchronizing objects, etc. For details on the other overloads, see the reference documentation.
Demonstration
In the following example, we specify the hostname, a port number, a username and a password, the local destination folder, various delegates for handling events, and the file to receive. For more details on how to work with receiving certificates, see Xceed's Snippet Explorer.
VB.NET | Copy Code |
---|---|
|
C# | Copy Code |
---|---|
|
Things you should consider
The main questions you should ask yourself when receiving files from an FTP server are:
-
Do you want to do more complex FTP operations? Use the FileSystem-based classes defined within the Xceed.Ftp namespace.