[Gambas-user] Directory Walker

Daniel Oxley oxleyd at ...364...
Sun Jun 27 13:16:34 CEST 2004


thats it!  thanks! 
 
 
---------- Original Message ----------- 
From: Rob <sourceforge-raindog2 at ...94...> 
To: gambas-user at lists.sourceforge.net 
Sent: Fri, 25 Jun 2004 14:43:47 -0400 
Subject: Re: [Gambas-user] Directory Walker 
 
> On Friday 25 June 2004 10:51, Daniel Oxley wrote: 
> > When I did it in VB (sorry) once, I seem to remember using a 
> > For File in Files command or something. 
>  
> I think what you're looking for is something like this: 
>  
> PUBLIC SUB WalkTree(path AS String) 
>   DIM Files AS String[] 
>   DIM f AS String 
>  
>   Files = Dir(path) 
>   FOR EACH f IN Files 
>     IF Stat(path &/ f).Type = gb.Directory THEN 
>       WalkTree(path &/ f) 
>     ELSE 
>       IF LCase(Right(f,4)) = ".jpg" THEN PRINT "Found a jpg: " &  
> path &/ f 
>       IF LCase(Right(f,4)) = ".mp3" THEN PRINT "Found an mp3: " &  
> path &/ f 
>       ' etc. 
>     ENDIF 
>   NEXT 
>  
> END 
>  
> ------------------------------------------------------- 
> This SF.Net email sponsored by Black Hat Briefings & Training. 
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -  
> digital self defense, top technical experts, no vendor pitches,  
> unmatched networking opportunities. Visit www.blackhat.com 
> _______________________________________________ 
> Gambas-user mailing list 
> Gambas-user at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/gambas-user 
------- End of Original Message ------- 
 




More information about the User mailing list