Directory list 
Author Message
 Directory list

Assume I know a domain name and can build a list of computers attached
to the domain.
For example, in an NT domain named BigDomain exist computers Jack and
Jill.
Jack has two shared directories named ShareC and ShareD.
Jill has one shared directory, ShareC.

The dir function is inadequate to deal with this in the abstract.
x=dir("BigDomain\Jack\*") yields nothing while
x=dir("BigDomain\Jack\ShareC\*") yields a file name.

The problem is that I don't know the names of the directories on the
computers.
I do know the domain name and the computer name.
How do you get the directory list?

Any assistance would be appreciated.



Sat, 29 Jun 2002 03:00:00 GMT  
 Directory list
Perhaps FindFirstFile/FindNextFile/FindClose will yield the desired results.
Also, if the workstations are running NT, you can bet that they have admin
shares like \\ServerName\C$ (but that's kind of cheesy). Or you could use
the NetShareEnum function to get a list of all shares for a given
workstation (which should work on Win9X as well, but you will probably need
to look at the LMSHARE.H header file to get the declare right).

--
Monte Hansen
Vb Yuk Yuk

No spam please


Quote:
> Assume I know a domain name and can build a list of computers attached
> to the domain.
> For example, in an NT domain named BigDomain exist computers Jack and
> Jill.
> Jack has two shared directories named ShareC and ShareD.
> Jill has one shared directory, ShareC.

> The dir function is inadequate to deal with this in the abstract.
> x=dir("BigDomain\Jack\*") yields nothing while
> x=dir("BigDomain\Jack\ShareC\*") yields a file name.

> The problem is that I don't know the names of the directories on the
> computers.
> I do know the domain name and the computer name.
> How do you get the directory list?

> Any assistance would be appreciated.



Sat, 29 Jun 2002 03:00:00 GMT  
 Directory list
Thanks, Monte. I looked up the function and it looks like NetShareEnum is
obsolete, replaced by WNetEnumResource. I'll play with it until I figure it out.
Quote:

> Perhaps FindFirstFile/FindNextFile/FindClose will yield the desired results.
> Also, if the workstations are running NT, you can bet that they have admin
> shares like \\ServerName\C$ (but that's kind of cheesy). Or you could use
> the NetShareEnum function to get a list of all shares for a given
> workstation (which should work on Win9X as well, but you will probably need
> to look at the LMSHARE.H header file to get the declare right).

> --
> Monte Hansen
> Vb Yuk Yuk

> No spam please



> > Assume I know a domain name and can build a list of computers attached
> > to the domain.
> > For example, in an NT domain named BigDomain exist computers Jack and
> > Jill.
> > Jack has two shared directories named ShareC and ShareD.
> > Jill has one shared directory, ShareC.

> > The dir function is inadequate to deal with this in the abstract.
> > x=dir("BigDomain\Jack\*") yields nothing while
> > x=dir("BigDomain\Jack\ShareC\*") yields a file name.

> > The problem is that I don't know the names of the directories on the
> > computers.
> > I do know the domain name and the computer name.
> > How do you get the directory list?

> > Any assistance would be appreciated.



Sun, 30 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help: displaying hidden directories in directory list box

2. Drive List and Directory List

3. Directory list in the list box

4. Save a directory listing in a table

5. Filliing a Table with directory listing

6. DOS directory listing - code sought

7. Help populating a table from directory list

8. ?Batch Include from directory listing

9. Macro for Directory list

10. Directory Listing

11. directory list box in a userform

12. treeview & listview, slow directory listing

 

 
Powered by phpBB® Forum Software