Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am doin a program which reads the privileges of a folder given the path of a folder... but when within that folder ther are others i have a problm. Are there ancy classes which shomw me if within a folder there are others and get me the paths of thet??
Posted

1 solution

Try Directory.GetDirectories[^] - the overload version allows you to specify all subdirectories.
 
Share this answer
 
Comments
Voley 5-Mar-15 8:21am    
I tried that, but that doesnt get the subfolders of the subfolders.. I want them all :(
OriginalGriff 5-Mar-15 8:30am    
And did you use the overloaded version? Because it does work for me...
Voley 5-Mar-15 8:40am    
Can u send me some code PLEASE?
OriginalGriff 5-Mar-15 9:04am    
You need me to send you *one line of code*?
You did follow the link I gave you, didn't you?

string[] folders = Directory.GetDirectories(@"D:\Temp", "*", SearchOption.AllDirectories);
Voley 5-Mar-15 9:27am    
I read it :) I really did...


but i had problems...
I made an recursive method


Public Sub Getdirectory(ByVal path As String)

For Each Dir As String In Directory.GetDirectories(path)
Dim podFolder As String

cmbDirectories.Items.Add(Dir)
subFolder = Dir.ToString

Getdirectory(podFolder)
Next

End Sub

Thankyou for your help

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