I have a collection (List(of String)) that contains file paths. Some of these files are in the root folder and others are in subfolders. I want to display the paths in a treeview while keeping the hierarchy of the file structure. For example:
c:\testfile1
c:\Folder1\testfile2
c:\Folder1\subfolder1\testfile3
c:\Folder2\testfile4
c:\Folder3\subfolder1\testfile5
Should be displayed in the treeview as:
testFile1
Folder1
|_______testfile2
|_______subfolder1
|________testfile3
Folder2
|_______testfile4
Folder3
|_______subfolder1
|________testfile5
I hope this makes sense. Thank you for any and all help.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.