Cableguy Expert Licensed User Longtime User Jun 22, 2016 #1 Well, the title says it all... Given a name, how can we search ALL of the folders for a folder with the given name? Also, how to list the system accessible hard drives?
Well, the title says it all... Given a name, how can we search ALL of the folders for a folder with the given name? Also, how to list the system accessible hard drives?
Erel B4X founder Staff member Licensed User Longtime User Jun 23, 2016 #2 There is no simple way to do it. You will need to actually go over all the folders by recursively calling File.ListFiles. Cableguy said: Also, how to list the system accessible hard drives? Click to expand... B4X: For Each drive As String In ListRoots Log(drive) Next Sub ListRoots As List Dim jo As JavaObject Dim o() As Object = jo.InitializeStatic("java.io.File").RunMethod("listRoots", Null) Return o End Sub Upvote 0
There is no simple way to do it. You will need to actually go over all the folders by recursively calling File.ListFiles. Cableguy said: Also, how to list the system accessible hard drives? Click to expand... B4X: For Each drive As String In ListRoots Log(drive) Next Sub ListRoots As List Dim jo As JavaObject Dim o() As Object = jo.InitializeStatic("java.io.File").RunMethod("listRoots", Null) Return o End Sub
ThRuST Well-Known Member Licensed User Longtime User Nov 22, 2016 #3 How to open any of the drives to browse contents on a Mac? Is Finder equal to Explorer on a PC? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 23, 2016 #4 Please start a new thread for this question. Upvote 0