There is a file listing program examples/FileFuncs.o2bas, which you could adapt to your requirements.
It will support an unlimited list of files: I've cleaned it up a little here:
$ filename "t.exe"
'#include "../../inc/RTL32.inc"
'#include "../../inc/RTL64.inc"
#include "../../inc/MinWin.inc"
#include "../../inc/FileDir.inc"
'====
'TEST
'====
zstring dirname[256]
string filter="*.o2bas"
string cr=chr(13,10)
sys count
'
GetCurrentDirectory 256, @dirname
string pr="Directory Name: " dirname cr "Filter: " filter cr cr
pr+=GetFileList (filter,count) cr cr
print pr count " files"