No need to answer this question at this time. I found an example of a sort module in the beginners guide I will experiment with. I would like to know why listfiles doesn't normally return files in filename sequence, though.
I'm using the command listfiles to return the filenames of all the files in a directory(folder). The file names include the date it was created. All of the file names are identical except for the date. The problem is that the files names are not always returned in date sequence. Is there a way to get listfiles to sort by name? If not is there an example of how to efficiently sort and array?
I'm using:
This was working fine until today. Now the file I created today is first in the list instead of last.
I'm using the command listfiles to return the filenames of all the files in a directory(folder). The file names include the date it was created. All of the file names are identical except for the date. The problem is that the files names are not always returned in date sequence. Is there a way to get listfiles to sort by name? If not is there an example of how to efficiently sort and array?
I'm using:
B4X:
Public MyList As List
Public MyFile As String
MyList.Initialize
MyList = File.ListFiles(File.DirRootExternal & "/ELSIE/")
MyFile = MyList.Get(0)
This was working fine until today. Now the file I created today is first in the list instead of last.
Last edited: