Free FTP Library

You can recommend a free FTP library (class) for C #.

The class should be well written and have good performance.

+85
c # ftp
Sep 03 '09 at 7:44
source share
7 answers

You can consider FluentFTP , formerly known as System.Net.FtpClient .

It is released under the MIT License and is available on NuGet (FluentFTP).

+60
Jun 18 2018-11-18T00:
source share

Why don't you use the libraries that come with the .NET platform: http://msdn.microsoft.com/en-us/library/ms229718.aspx ?

EDIT: April 2019 at https://stackoverflow.com/users/1527/ This answer is no longer valid. Other answers are approved by Microsoft.

They were developed by Microsoft, which no longer recommends their use:

We do not recommend using the FtpWebRequest class for new designs. For more information and alternatives to FtpWebRequest, see WebRequest should not be used on GitHub. ( https://docs.microsoft.com/en-us/dotnet/api/system.net.ftpwebrequest?view=netframework-4.7.2 )

The "WebRequest should not be used" page, in turn, points to this question as the final list of libraries!

+20
Feb 23 2018-10-23
source share

edtFTPnet is a free, fast, open source library for .NET written in C #.

+12
Feb 15 '10 at 11:52
source share

I like the Alex FTPS Client , which is written with the name Microsoft MVP Alex Pilotti. This is a C # library that you can use in console applications, Windows Forms, PowerShell, ASP.NET (in any .NET language). If you have a multi-threaded application, you will have to configure the library to run synchronously, but overall a good client, which is likely to get you what you need.

+7
Dec 23 2018-11-11T00:
source share
+5
03 Sep '09 at 7:50
source share

I just published an article that introduces both the FTP client client and FTP user control.

They are simple and not very fast, but very easy to use and all source code is included. Just drop the user control into the form so that users can navigate FTP directories from your application.

+1
Mar 10 '11 at 17:15
source share

After many studies in the same issue, I found it very convenient: https://github.com/flagbug/FlagFtp

For example (try to do this with the standard .net "library" - this will be a real pain) → Recursively restore all files on an FTP server:

public IEnumerable<FtpFileInfo> GetFiles(string server, string user, string password) { var credentials = new NetworkCredential(user, password); var baseUri = new Uri("ftp://" + server + "/"); var files = new List<FtpFileInfo>(); AddFilesFromSubdirectory(files, baseUri, credentials); return files; } private void AddFilesFromSubdirectory(List<FtpFileInfo> files, Uri uri, NetworkCredential credentials) { var client = new FtpClient(credentials); var lookedUpFiles = client.GetFiles(uri); files.AddRange(lookedUpFiles); foreach (var subDirectory in client.GetDirectories(uri)) { AddFilesFromSubdirectory(files, subDirectory.Uri, credentials); } } 
+1
Nov 27 '13 at 18:07
source share



All Articles