Click here to Skip to main content
15,881,819 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 10 computers conected in a network and each of the desktop contains few folders and each of these folders are having sub folders with name like abc,123 (and these folder contains other subfolders also).

Now I want to get folder names which are having name ends with (_del (or) _old).
Can any of you help me in this....
Posted
Comments
Sushil Mate 28-Mar-12 8:58am    
are they folders shared?

1 solution

With main_directory being the path to the top level directory, do
C#
string[] del =  System.IO.Directory.GetDirectories(main_directory, "*_del", System.IO.SearchOption.AllDirectories);
 
Share this answer
 
Comments
ProEnggSoft 28-Mar-12 9:20am    
To the point. 5!

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