Click here to Skip to main content
15,897,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have around 20 files on webserver. The name of the File are 7JNProductMaster.txt,7BPProductMaster.txt. The first 3 chars of the file name is a salesman code. for one salesman i have 6-7 files, now i want to download the all the files for the paricular salesman. i used webclient.Downloaddata bur it downloads the one file at time. i want to provide only the SalesmanCode and all the files which conatins that code get downloaded Eg.----


WebClient request = new WebClient();
  byte[] fileData = request.DownloadData("Webserverath" + SalesmanCode + "*.txt");
Posted
Updated 24-Mar-10 19:37pm
v3

1 solution

The only way to do this is to iterate over the files and download them one at a time, unless you can get something on the server to create a zip of all the files you want. Personally, I'd put a webservice on the server that takes a salesmans prefix, then creates a zip on the server as needed, and sends it back.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900