Lots of folks like to ask for a way to easily grab the contents of a directory and import a list of the contents of that directory into their programs, so for them, I introduce my little File Grab Library.
'$INCLUDE:'Filegrab.BI'
SelectFile
_CWD$, "*.*", Results
()
'$INCLUDE:'Filegrab.BM'
As you can see, usage is fairly straight forward.
Extract to your QB64 folder.
Include the header.
Include the footer.
REDIM an array to hold the results.
Call the routine with
SelectFile _CWD$, "*.*", Results(),
SelectFile is the name of the routine.
First Parameter _CWD$ can be replaced with whatever directory you want the contents of.
Second Parameter "*.*" is the filter of whatever you want for that directory. Use "*.txt" for a listing of all text files, for example.
Third Parameter Results() is the REDIM array which you use to store the results of the file listing.
Works on Windows, Linux, and Mac.