I'd like to display the content of a directory alphabetically.
The NextDirectoryEntry(#Directory) command obtains the entries by (I think) date order? Is there an easy way to alter this so that it instead displays alphabetically?
Code: Select all
entries = 0
If ExamineDirectory(#Directory, Directory$, "*.msg") ;// Only look for .msg files
While NextDirectoryEntry(#Directory)
entries = entries + 1 ;// Count the total of .msg files
Filename$ = DirectoryEntryName(#Directory) ;// Get the Filename
AddGadgetItem(#List, -1,Filename$) ;// Place it into the list window
Wend
FinishDirectory(#Directory)
EndIf