[pywin32] windows shares, was os.listdir("\\\\delta\\public")
Egor Bolonev
ebolonev at mail.ru
Mon Dec 6 03:49:55 EST 2004
> 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 Microsoft Office Document Image Writer
> Printer2 Print hp psc 1310 series
> Printer3 Print HP LaserJet 4
> shared Disk I:
> SharedDocs Disk
> The command completed successfully.
>
> 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. Or you could figure it out yourself
> if you are motivated enough.
how to get list of shares using pywin32?
More information about the Python-list
mailing list