show all *.txt files

Cor

Active Member
Licensed User
Longtime User
How to show all *txt files in a inputlist which are added
in IDE by TAb files
 

Cor

Active Member
Licensed User
Longtime User
file.readlist problem

fileList=File.readlist(File.DirAssets,".boek") <-- file not found error

does not work


B4X:
fileList=File.ListFiles(File.DirAssets) <- this works show all files

  fileList=File.readlist(File.DirAssets,".boek")   <-- file not found error
  result=InputList(filelist,"Selecteer Boek",-1)
 
Upvote 0

Cor

Active Member
Licensed User
Longtime User
I have made a temp solution

B4X:
  fileList=File.ListFiles(File.DirAssets)
  boekList.Initialize
  
  For cnt=0 To filelist.Size-1
    line=filelist.Get(cnt)
   If line.IndexOf(".boek") <> -1 Then
     boekList.Add(line)
   End If
  Next   
  result=InputList(boekList,"Selecteer Boek",-1)
 
Upvote 0
Top