I am trying to display files in a folder using this code:
import subprocess
import os
subprocess.call(r'net use \\\\192.168.50.11\c$\Folder_Name\ /user:vicky password:pass123', shell=True) #connect with network drive
print('Connection Established')
x = os.listdir('\\\\192.168.50.11\\c$\\Folder_Name') #display the name of the files in directory
print(x)
But getting error as:
WinError 1326 the Username or password is incorrect:\\\\192.168.50.11\\c$\\Folder_Name
How can I solve this problem?