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

Bodard Fabien gambasfr at ...11...
Tue Mar 1 20:03:54 CET 2005


Le mardi 1 Mars 2005 15:01, Benoit Minisini a écrit :
> On Tuesday 01 March 2005 14:43, Oliver Stieber wrote:
> >  --- Eldon Eller <eeller at ...826...> wrote:
> > > 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?
> >
> > dir,
> > but it seems broken for UTF8 filenames.
> > you can use something like...
> >
> > DIM Directory AS String
> > DIM Files AS String[]
> > DIM file AS String
> > Directory = "/home/foo"
> > Files = Dir(Directory, "*")
> > print Files.count
> > FOR EACH file IN Files
> >
> > NEXT

i think you need to not use the word file for a variable... 'File' is a native 
class of gambas !

Prefer sFile

Fabien





More information about the User mailing list