[Gambas-user] How do I fetch a list of files?

Ron Onstenk ronstk at ...239...
Wed Mar 2 22:00:25 CET 2005


On Tuesday 01 March 2005 13:39, Bodard Fabien wrote:
> Le mardi 1 Mars 2005 07:25, Eldon Eller a écrit :
> > Yet another dumb question (YADQ): I am writing a gambas app where I want
> > the user to select from a list of files (not via a dialog). So I need a
> > way to fetch the file names from a specified directory. How do I do that?
>
> Look at fill_explorer in the gambas ide in the FSupExplorer class
>
> dim sDir as string
> For each sDir in Dir(sPath, "*")
> ListView.Add(sPath &/ sDir, sDir)
> Next
>
> Gambas power ;)
>
> Fabien Bodard
>

If I remeber well then next does also the job.
  ListView.List = Join( Dir(sPath, "*") , ";" )
Can be "\n" instead of ";"

Ron




More information about the User mailing list