FileSearch adds files to an ArrayList.
So you can call it multiple times with different patterns:
B4X:
[FONT=Times New Roman][COLOR=#010101][COLOR=#010101][FONT=Times New Roman]FileSearch (alFiles, "\My Documents", "*.jpg")
[/FONT][/COLOR][/COLOR][/FONT][FONT=Times New Roman][COLOR=#010101][COLOR=#010101][FONT=Times New Roman]FileSearch (alFiles, "\My Documents", "*.gif")[/FONT][/COLOR][/COLOR][/FONT]