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

Oliver Stieber oliver_stieber at ...370...
Tue Mar 1 14:43:51 CET 2005


 --- 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




-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
>
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/gambas-user
>  

Send instant messages to your online friends http://uk.messenger.yahoo.com 




More information about the User mailing list