Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,


I want to populate a treeview with the list of all folders and subfolders from a Drive

I have a Windows form having a tree view on it. I want to populate it with all folders and subfolders from a Directory. I googled for this, and didnt get any good source, could any one help on this?


Say if i select D:\ , then the treeview loads with all folders and subfolders in D:\



Any help will be thankfull
Posted
Comments
Member 11330626 20-Jan-15 6:22am    
hi, I am doing "Virus Tracking System". I have to scan the directory selected from the treeview in c#.net

Concentrate on one node. It should represent a path. Get all its subdirectories using the GetDirectories[^] method. Create a child node for every subdirectory. Repeat if user expands one of the child nodes.
 
Share this answer
 
 
Share this answer
 
v3

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