C# FTP using .NET 2.0

  • Thread starter Thread starter Tim Cowan
  • Start date Start date
T

Tim Cowan

Hi,

Does anyone have any examples/tutorials of FTP functionality using .NET 2.0?

I want to connect to the server, get a list of files and download/upload all
in C#.

Can someone help?

Thanks

Tim
 
Tim,

You might want to check out the documentation for the FtpWebRequest and
FtpWebResponse classes in the System.Net namespace. They should give you
what you are looking for, as well as some examples as well.

Hope this helps.
 
Tim Cowan said:
Hi,

Does anyone have any examples/tutorials of FTP functionality using .NET
2.0?

I want to connect to the server, get a list of files and download/upload
all in C#.

I spent some time trying to figure out the new FTP classes in .NET 2.0.
This isn't exactly what you want but, it might help, there is C# source code
that uploads a file or downloads a file. However, these were written as
examples of Windows Workflow Activities so, if you don't have Windows
Workflow beta 2 installed, this code won't compile. You will still be able
to cut out the FTP stuff and paste it into your non-workflow code.

The C# source code is available at:

http://www.mvpsi.com/ftpactivities.html

John Vottero
 
Back
Top