Results 1 to 3 of 3

Thread: Using the FSO to map LANs

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2001
    Location
    Redcar, UK
    Posts
    24

    Post Using the FSO to map LANs

    I am using this code to map all the drives on my local machine but would like to dearly know how to access the shared files and folders on the lan we have and map them as well, can anyone help please.



    Private Sub Form_Load()
    Dim objDrive As drive

    For Each objDrive In fso.Drives
    cboDrives.AddItem objDrive 'map the local drives into cbo
    Next



    This works great but I cannot find out how to do this with the lan machines?? Can anyone help me out please, I have tried the UNC method:


    For Each objDrive In fso.Drives("\\SERVERNAME\.."


    but all get back is "Path not found", I do know its possible but am unsure as how to expand on what I have, there is very little info on this I can find.

    Any help would be most appreciated.


    Happy days,

    Smithy.
    "Three minutes thought would suffice to find this out; but thought is irksome and three minutes is a long time."


    "The supreme irony of life is that hardly anyone gets out of it alive."

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I remember reading something about not being able to access "\\Servername\" as a folder - you have to use "\\Servername\folder\", which would require you know the folder names ahead of time, which won't help you much.

    I think you'll need the NetShareEnum or WNetEnumResource API calls to do what you need. This site probably has the info:
    http://www.mvps.org/vbnet/
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2001
    Location
    Redcar, UK
    Posts
    24
    Tanks Josh, will let you know if that works and will post a routine to do it, may help others but for now thanks for the reply.

    If anyone else has any more information please continue posting
    "Three minutes thought would suffice to find this out; but thought is irksome and three minutes is a long time."


    "The supreme irony of life is that hardly anyone gets out of it alive."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width