How to Filter ReadList to retrieve only images files in a folder
what's the best way to retrieve the first image in a folder? (jpg, gif, png, ecc.)
I'm trying to use File.ReadList but there is not an option FILTER, to set the files extension as filter.
In FileDialog for example there's a properties:
ex. fd.FileFilter = ".jpg, .gif, .png, .jpeg"
any suggestion?
what's the best way to retrieve the first image in a folder? (jpg, gif, png, ecc.)
I'm trying to use File.ReadList but there is not an option FILTER, to set the files extension as filter.
In FileDialog for example there's a properties:
ex. fd.FileFilter = ".jpg, .gif, .png, .jpeg"
B4X:
Dim fileList As List
fileList = File.ReadList(path1 ,"*.jpg") '<< set a filter to list only image??
fileList.Sort(True)
If fileList.Size > 0 Then
..............
any suggestion?
Last edited: