Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I developed a wcf service for transfering file to and from server.
now I want to transfer filefolder ( all folders and files in this folder are subject to transfer ) . once given the folder it should able to transfer to and from server.

I am thinking about it and I would like to know if there is a simple solution.
in anyone know simple and easy way to do it?

thanks in advance!
Posted

1 solution

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.

C#
string[] filePaths = Directory.GetFiles(@"c:\MyDir\", "*.doc",
                                         SearchOption.AllDirectories);


Combination of both logic, will give you a simple solution.
 
Share this answer
 
Comments
Alimjan Yasin 19-Sep-11 6:55am    
I thought a while and find out a solution , and your code is useful. thanks for your advice!

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