I think you've the logic for transferring file to and from server. System.IO namespace of .NET, has GetFiles method to fetch all folder and files in a particular folder.
string[] filePaths = Directory.GetFiles(@"c:\MyDir\", "*.doc",
SearchOption.AllDirectories);
Combination of both logic, will give you a simple solution.