04-16-2025, 08:59 PM
You could also try:
Code: (Select All)
Sub LoadFromTxt (txt_file$, names_list$())
' load a list of file names from a txt file
Dim fp&: fp& = FreeFile
Dim tmp$
Dim count&: count& = 1
Open txt_file$ For Input As fp&
While Not EOF(fp&)
Input fp&, tmp$
tmp$ = LTrim$(RTrim$(tmp$))
If tmp$ <> "" Then
' test for image suffix .*
Restore
Do
Read Tst$
If Tst$ = ".eod" Then Exit Do
If Mid$(tmp$, Len(tmp$) - 4, 4) = Tst$ Then
names_list$(count&) = tmp$
count& = count& + 1
End If
Loop
End If
Wend
Close fp&
End Sub
Data ".png",".bmp",".jpg",".tga",".psd",".gif",".hdr",".pic",".pnm",".pcx",".svg",".ico",".cur",".qoi",".eod"