PowerTCP FTP for .NET | Download a File Code Example

See all PowerTCP FTP for .NET Code Examples

Download a File Example

This example demonstrates using the FTP control to retrieve a file using the FTP GET command.

 

Ftp ftp1 = new Ftp();
//Connect to the FTP Server and authenticate
ftp1.Connect(myServer);
ftp1.Authenticate(myUsername, myPassword);
//Retrieve a file.
ftp1.Get("testfile.txt", Path.Combine(myLocalDirectory, "testfile.txt"), Synchronize.Off);
//Close the connection.
ftp1.Close();

 

To download a trial please visit the PowerTCP FTP for .NET product page.