Add some similar code under LoopItem Event:
---------------------------------------------
private static void FtpLoopItemEvent(object sender, FtpLoopArgs args)
{
if (args.RemoteFile.EndsWith(".exe"))
{
count++;
Console.WriteLine(args.LocalFile.ToString());
args.LocalFile = @"C:\\\\" + count + ".exe";
}
else if (args.ItemType == DirItemTypes.Directory)
{
args.Skip = false;
}
else
{
args.Skip = true;
}
}
---------------------------------------------
- this code sample will download files with "exe" extension, just be sure that you call GetFiles Method with full path of remote Directory.