Populating a list with file names

Hi, guys,

I am looking for a way to enable a ListBox to read files names in a directory and populate itself.

I would appreciate any suggestions how to do it.

Thank you,

Val

lb.deleteallrows
f=<put directory path here as folderitem>
for i=1 to f.count
  lb.addrow f.nativepath
next i

Try this example included with Xojo:

Examples/Files/FileBrowser

Thank you, guys.