Listing Dir's inside Dir's 
Author Message
 Listing Dir's inside Dir's

Im haveing a hard time trying to get VB to list directorys that are in
outher directorys(sub Dirs) By useing the Dir comand with the
vbDirectory flag i cant get it to list sub directorys
any help would be great
thanks alot



Thu, 13 Jul 2000 03:00:00 GMT  
 Listing Dir's inside Dir's

: Im haveing a hard time trying to get VB to list directorys that are in
: outher directorys(sub Dirs) By useing the Dir comand with the
: vbDirectory flag i cant get it to list sub directorys
: any help would be great

make an array.  do a dir with the vbdirectory flag.  place
the resultant 'directories to be explored' in that array.  process
the files in the directory.  take the top one off of your
array, and repeat.

- adrian



Thu, 13 Jul 2000 03:00:00 GMT  
 Listing Dir's inside Dir's

Look at WinSeek.vbp in \..\samples\misc\FileCtls\

That shows you how it is done, and just needs a little modification,
unless I've missed your point. It's 1AM over here, so it would be very
easy for me to do that...

Quote:

> Im haveing a hard time trying to get VB to list directorys that are in
> outher directorys(sub Dirs) By useing the Dir comand with the
> vbDirectory flag i cant get it to list sub directorys
> any help would be great
> thanks alot



Fri, 14 Jul 2000 03:00:00 GMT  
 Listing Dir's inside Dir's



Quote:
> Im haveing a hard time trying to get VB to list directorys that are in
> outher directorys(sub Dirs) By useing the Dir comand with the
> vbDirectory flag i cant get it to list sub directorys
> any help would be great
> thanks alot

I've written a class called clsDirectory that has this feature. You
can write:

Dim Directory As New clsDirectory
Dim SubDir    As clsDirectory

        Directory.Name = "the path"

        For Each SubDir in Directory.SubDirs
                ...
        Next

You get the point.

Get the file from
ftp://ftp.sol.no/user/balchen/vbi/source/Common/Files/Directory.cls if
you like.

--
http://home.sol.no/~balchen/vbi/



Sat, 15 Jul 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. I'm Not Happy about dir list boxes

2. Tricky 'Dir' function

3. TreeView (Dir's)

4. TreeView (dir's)

5. get user's file permissions in a dir

6. W95 long filenames & VB3's DIR$

7. Searching through dir's for a File?

8. DIR function doesn't recognize file

9. Dir won't give me just DIRs in VB 4.0

10. Dir with vbDirectory ain't working!

11. VB4 FileListBox doesn't support LFN if dir has LFN

12. reading all dir's on all drives ?

 

 
Powered by phpBB® Forum Software