Here is a litttle file lister program. Copy the code into dark basic and then make a final standalone .exe. Then put it in the folder which contains the files you want to list. Then run it. It will ask you for a file name$. That is the file which the list will be written to. Next it will ask for the number of files. Right click in the folder the file is in and find the amount of files. Put that into the program. And lastly it will ask for the type of file like .bmp or .3ds. After it finishes, if you open your list file, it will list all the files in the directory that are the type you chose. This program is useul for games with a large amount of files to load. You could do something like this in your program:
cd "media"
open to read 1,"images.list" :`filename goes here
imagenum = 1
repeat
read string 1,filename$
load image filename$, imagenum
imagenum = imagenum + 1
until file end(1) = 1
close file 1
Here is the file lister program:
set window on
Input "enter file name:",file$
Input "enter # of files:",numoffiles
numoffiles = numoffiles + 2
Input "type of file (example:.bmp):",filetype$
open to write 1,file$
find first
if Right$(get file name$(), Len(filetype$)) = filetype$
write string 1,get file name$()
numoffiles = numoffiles - 1
endif
repeat
find next
if Right$(get file name$(), Len(filetype$)) = filetype$
write string 1,get file name$()
numoffiles = numoffiles - 1
endif
until numoffiles = 0
Print "done"
suspend for key
close file 1
end
Yes, I know, it is longer that 20 lines, but I didn't stack them. The rules say you can have 20 lines with 25 stacked commands each, which is the same as saying you can have 500 lines, and I

HATE

stacked code, so I just didn't.
If anyone finds a way to improve it, please tell me!
Things to improve:
-For some reason, there is a blank space after the last file, which messes up using it to load files in a different program, so you have to go into it and get rid of the extra space.
Green Bunnies rule!
