> function FindFirst(const Path: string; Attr: Integer; var F: TSearchRec):
> Integer;
>
> The Path parameter excepts a valid directory string, eg.
> Findfirst('\\IT_Support\KnowledgeBase', Attr, F) works just fine. However
if
> I pass the machine name only - Findfirst('\\IT_Support', Attr, F), it
> returns ERROR_PATH_NOT_FOUND.
>
> Could someone suggest a correct method of retrieving TOP LEVEL directory
and
> file information of a remote machine?
>
I don't know a good alternative but I do know why it doesn't work. FindFirst
iterates subdirectories of a directory but \\IT_Support doesn't actually
have any subdirectories (nor is it a directory itself). Instead it has a
collection of shared drives (a very different concept). What you need is a
way of iterating through the accessible shared folders of a machine. I
suspect there are some API type calls which will do that but I haven't tried
it myself.

David.
DB Solutions Ltd.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to