Sorry to be a pain, but after a long time away I need to write a quick program and I can't remember how some things work any more.
Using the FilesEx library, what precisely do I do to get a list of subdirectories in a given directory into a ListBox or ArrayList? The help says:
A simple example would really help here. I have no need of any "pattern" of directory names, I just want them all listed. The compiler doesn't seem to like * or "*" but it does accept the line if I leave this part blank, as:
(SearchPath is a string variable previously set). If I did want a pattern, what would it look like?
I can't get my head around the idea of "returns a string array" either. Does this mean that you have to dimension an array, and somehow transfer the directory names into it, and then parse one by one through the array items to transfer them into the ListBox? I have tried various approaches and all I end up with is a ListBox containing the single word "array" !
The worst thing is, I managed to make this work about a year ago, but the code is mysteriously missing from my PC... :sign0161:
Thanks in advance for any helpful clues
Caravelle
Using the FilesEx library, what precisely do I do to get a list of subdirectories in a given directory into a ListBox or ArrayList? The help says:
GetDirectories(Path As String, Pattern as String) : Returns a string array containing the names of all directories within the directory specified by Path and matching the search pattern.
A simple example would really help here. I have no need of any "pattern" of directory names, I just want them all listed. The compiler doesn't seem to like * or "*" but it does accept the line if I leave this part blank, as:
B4X:
GetDirectories(SearchPath, )
I can't get my head around the idea of "returns a string array" either. Does this mean that you have to dimension an array, and somehow transfer the directory names into it, and then parse one by one through the array items to transfer them into the ListBox? I have tried various approaches and all I end up with is a ListBox containing the single word "array" !
The worst thing is, I managed to make this work about a year ago, but the code is mysteriously missing from my PC... :sign0161:
Thanks in advance for any helpful clues
Caravelle