C# FTP using .NET 2.0

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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
J

John Vottero

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top