C# and FTP

  • Thread starter Thread starter JPSutor
  • Start date Start date
J

JPSutor

Can someone show me a good code example of how to use FTP to transfer a
file to a website.
Please, no Microsoft examples, they are so very vague.
 
Can someone show me a good code example of how to use FTP to transfer a
file to a website.
Please, no Microsoft examples, they are so very vague.

There's no direct FTP support in v1.x of the Framework so you will need to
use a 3rd-party component, but there is in v2.

Which version do you need help with...?
 
Can someone show me a good code example of how to use FTP to transfer a
file to a website.
Please, no Microsoft examples, they are so very vague.

Indy (http://www.indyproject.org) does have robust FTP support and
there is a version for C#.
--
J. Peter Mugaas - Indy Pit Crew
Internet Direct (Indy) Website - http://www.indyproject.org
Check our my blog at
http://www.indyproject.org/Sockets/Blogs/JPeterMugaas/index.iwp
If I want to do business with you, I will contact you. Otherwise, do
not contact me.
 
Can someone show me a good code example of how to use FTP to transfer a
file to a website. Please, no Microsoft examples, they are so very vague.

Here's an Xceed FTP for .NET example for transfering one single file:

using Xceed.Ftp;

FtpClient ftp = new FtpClient();
ftp.Connect( "localhost" ); // replace with your ftp server address
ftp.Login();
ftp.SendFile( @"d:\test.txt", "ftp_test.txt" ); // local file, remote
ftp.Disconnect();

Replace "SendFile" with "SendMultipleFiles" and you can then send
entire directory structures with wildcards in one fell swoop.

Xceed FTP for .NET is a component that's part of Xceed's Data
Manipulation Suite:

http://www.xceedsoft.com/products/dms


--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and Windows Forms UI controls

Email: (e-mail address removed) (remove the first 'x')
 
Back
Top