Avatar ·

How to open a network folder with a password in Windows?

📁 Advanced Python Topics

I need to open a network folder in Explorer from a Python script.

I can open network folders without a password via Startfile:

  os.startfile ( r "" \\\\ 192.168.1.2 \\ folder "" )   

The problem is that I need to open a network folder with a password, and then Startfile gives an error:

  OSError: [WinError ] The network password is incorrect:  '\\\\\\\\ 192.168.1.3 \\\\ folder'    

First, where can I specify the network password?

Is it possible to somehow display the standard password prompt in Explorer?