Does anyone know how I can determine the server and share name of a mapped network drive?
For example:
import win32file, win32api for logDrive in win32api.GetLogicalDriveStrings().split('\x00'): if win32file.GetDriveType(logDrive) != win32file.DRIVE_REMOTE: continue # get server and share name here
Is there a handy api call for this?
Thanks.
You’ll have to call the win32 API: WNetGetUniversalName