n B4A, once the user has selected a directory with the ExternalStorage library, you list its contents the same way you’d list a normal folder with File.ListFiles, using the path (or folder handle) returned by ExternalStorage.
Example (non-recursive):
basic
'Assume SelectedDirPath is the directory path returned by ExternalStorage
'e.g. "/storage/emulated/0/Download/MyFolder"
Dim SelectedDirPath As String = ExternalStorage1.SelectedDirPath 'adjust to your actual property/method
Dim items() As String = File.ListFiles(SelectedDirPath, "*")
For i = 0 To items.Length - 1
Log(items(i))
Next
'Assume SelectedDirPath is the directory path returned by ExternalStorage'e.g. "/storage/emulated/0/Download/MyFolder"
Sub ListDirRecursive(BasePath As String, Prefix As String)
Dim items() As String = File.ListFiles(BasePath, "*")
For i = 0 To items.Length - 1
Dim name As String = items(i)
Dim full As String = File.Combine(BasePath, name)
If File.IsDirectory(full) Then
ListDirRecursive(full, Prefix & name & "/")
Else
Log(Prefix & name) 'file found
End If
Next
End Sub
Sub AppStart
Dim SelectedDirPath As String = ExternalStorage1.SelectedDirPath 'adjust
ListDirRecursive(SelectedDirPath, "")
End Sub
If you paste the exact ExternalStorage code you’re using to get the selected directory (the line where you receive/store the selection), I’ll adjust the snippet to match the exact property/method names your version of the library uses.