' *** DIR_FILE.LST *** 2nd GFA-Manual, page 11-20 > PROCEDURE dir_files(path$,ext$,VAR dir.files$(),last.file) ' ' *** Put all files with path path$ and extension ext$ in string-array ' *** The index of the last file is returned in last.file& ' LOCAL i,search$,dta.adr%,stat IF DIM?(dir.files$())<>0 ERASE dir.files$() ENDIF DIM dir.files$(99) ! not more than 100 files <<< adapt this >>> IF RIGHT$(path$)="\" search$=path$+"*."+ext$ ELSE search$=path$+"\*."+ext$ ENDIF dta.adr%=FGETDTA() stat=FSFIRST(search$,0) ! first file IF stat=0 LET dir.files$(0)=CHAR{dta.adr%+30} ENDIF REPEAT stat=FSNEXT() ! next file IF stat=0 INC i LET dir.files$(i)=CHAR{dta.adr%+30} ENDIF UNTIL stat<>0 last.file=i RETURN ' ********* '