Hi Tim,
Something like this is what I think you are looking for:
from win32com.client import Dispatch
theNetwork = Dispatch("WScript.Network")
mappedNetDrives = theNetwork.EnumNetworkDrives
for netDrive in mappedNetDrives():
print netDrive
Should give you some ideas anyway.
Cheers!!
On 6 Dec
Egor Bolonev wrote:
Try grabbing the output of os.popen(r"net view \\delta") and
parse it to get a list of the shares:
c:\>net view \\monolith
No doubt you can also do this much more easily with the pywin32
package, or via COM (using pywin32 or ctypes), but I'll leave
that response to someone else.
[Egor Bolonev]
| how to get list of shares using pywin32?
You want to be looking at the NetShareEnum function
in the win32net module.
TJG
This e-mail has been scanned for all viruses by Star. The
service is powered by Mess
Try grabbing the output of os.popen(r"net view \\delta") and
parse it to get a list of the shares:
c:\>net view \\monolith
Shared resources at \\monolith
Share name Type Used as Comment
---
Printer Print M