how to separate a file path

smiles

Well-known member
Joined
May 21, 2008
Messages
47
Programming Experience
Beginner
Hi! I type search word in a textbox and it lists all files that contain the word.
I want the path of these file appear in treeview manner, so intend to separate the file path in many parts (separated by "\")
Do you know any function can do this.
I temporarily not find out, so intend to use string, substring() function to get each part in file path, but seem that VB.Net doesn't allow for i=10 downto 0 syntax (for e.g)
Do you have any idea for this ?
Thanks
 
Take the path string and use it's .Split(IO.Path.DirectorySeparatorChar) to get an array of each piece of the path
 
Back
Top