Hi,
Can anybody tell me why this bit of code is ignoring the root folder?
Code:Private Function GetAllFolders(ByVal folder As String) As String() For Each strFolder As String In Directory.GetDirectories(folder, "*", SearchOption.TopDirectoryOnly) Try strAllFolders.AddRange(GetAllFolders(strFolder)) SearchIn(strFolder) Catch ex As Exception ' Ignore End Try Next Return strAllFolders.ToArray End Function




Reply With Quote