PowerTCP FTP for .NET | Download Multiple Files Code Example

See all PowerTCP FTP for .NET Code Examples

Download Multiple Files Example

This example demonstrates using the FTP control to retrieve multiple files using the FTP GET Command.


Ftp ftp1 = new Ftp();
//Connect to the FTP Server and authenticate
ftp1.Authenticate(myUsername, myPassword);
//Retrieve a list of txt files to transfer.
List filesToGet = ftp1.ListDirectoryTree(null, "*.txt", false);
//Retrieve the files.
ftp1.Get(filesToGet, string.Empty, myLocalDirectory, Synchronize.Off);


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