[pywin32] windows shares, was os.listdir("\\\\delta\\public")

Dermot Doran doran_dermot at emc.com
Tue Dec 7 04:32:10 EST 2004


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 2004, at 11:04, Tim Golden wrote:

> [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 MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> _______________________________________________________________________ 
> _
> -- 
> http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1048 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20041207/30aedbfc/attachment.bin>


More information about the Python-list mailing list