Python - How to open Windows share using user name and password

后端 未结 4 1580
礼貌的吻别
礼貌的吻别 2020-12-10 14:57

I would like to access Windows share (ex. \\backupserver\\backups) from Python script. Share is protected by user name and password. How to open this share using user name a

4条回答
  •  情话喂你
    2020-12-10 15:24

    Why don't you mount the related share using the

    NET USE 
    

    command?

    Calling NET USE from through the subprocess module is straight forward.

提交回复
热议问题