Version: 4.7.3.0
Easily add comprehensive, secure FTP to any .NET application or service.

Code Examples

The FTP component frees you from having to write 'spaghetti code' that jumps from function to function using asynchronous 'Begin' and 'End' methods, just so you can perform your work and update the UI at the same time.

Asynchronous methods are not necessary. You do your work in one function and use the 'Start' method to execute it on a worker thread without freezing the interface. Component events are raised on the UI thread, eliminating the need to write delegates and call 'Invoke' from the worker thread.

To the right is a side-by-side comparison between code using PowerTCP FTP for .NET and code using a competitor's product. The task is to log into an FTP server, upload a directory, and log out, while updating status in a log window and progress bar. Take a look at the code and ask yourself, "Which code would I rather write and maintain?"

      Code Comparison

These code snippets can be copied and pasted into your project.

Code Snippet Description
  File Listing How to retrieve a file listing.
  File Listing (Wildcards) How to use GetDirectoryTree() with a wildcard to list files and download them.
  Download a File How to download a file.
  Upload a File How to upload a file.
  Download Multiple Files How to download a directory tree using a single method. (MGET)
  Upload Multiple Files How to upload a directory tree using a single method. (MPUT)
  Append to a Remote File How to append to a remote file.
  Resume a Download  How to continue a file download that was previously interrupted.
  Resume an Upload  How to continue a file upload that was previously interrupted.
  Download with Streams  How to download a remote file without storing it as a local file using streams.
  Upload with Streams  How to upload dynamically generated data to a server using streams.
  Using a Proxy Server  How to access an FTP server through a 'user' proxy server.
  SSL/TLS Configuration  How to specify a minimal SSL/TLS security level.
  Throttle Transfer Speed  How to throttle the speed of a file transfer.
  Synchronize File DateTime  How to synchronize the datetime of transferred files.
  Custom Commands  How to send custom FTP commands.
  Using Windows Forms  How to create a thread, execute commands on that thread, and marshal data for display in Windows Forms applications.

Sample Projects

Samples are working applications demonstrating FTP for .NET components in C#, VB.NET and PowerShell. Source code included.

Sample Name  Description 
ListView Client A medium size Windows Forms application demonstrating storing and retrieving files, displaying file transfer progress, aborting transfers, and retrieving and displaying listings.
Streaming Transfer Demonstrates how to retrieve and store a file data directly from/to memory using a Stream.
Parallel Transfers Demonstrates how to to transfer several files simultaneously, using multiple concurrent FTP sessions.
FTP Web Service Demonstrates a web service that utilizes the Ftp component.
FTP WCF Service Demonstrates a Windows Communication Foundation (WCF) service that utilizes the Ftp component.
Task-Async ListView Client Implements the functionality of the ListView Client using the 4.5 .NET Framework System.Threading.Tasks.Task.Run() method. This obsoletes the Start and Marshal methods along with the UserState, Listing, Copy, and Error events, while allowing for a simple multithreaded design.
WPF Listview Client Similar to the ListView Client, but written using Windows Presentation Foundation (which uses DirectX)
Console Ftp Demonstrates retrieving a file in a simple single-thread console application.
PowerShell Get and Put Demonstrates how to upload and download files from a scripting application.
Web Service Dynamically gets a file from an FTP server on behalf of a consumer.
WCF Service Dynamically gets a file from an FTP server on behalf of a consumer.
ListView Client Web Application Demonstrates a web-based FTP client.

 Download the FTP for .NET Sample Projects

After downloading, you will need to unblock the zip before extracting it: locate the zip in Windows explorer, right-click on it, select 'Properties', and click the 'Unblock' button in the bottom-right corner of the General tab.

This will resolve the compile-time exception 'Could not load file or assembly 'Dart.*****' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'.