I am creating some QR images and wish to store in a shared folder path which requires username and password to access.
qrFolder = '\\cmbpnh01-srv-03\Tidata\12. IT Projects\QR Code Creation\QA QR Code Creation'
user = 'xxx\xxx'
password = 'xxx'
winCMD = 'NET USE ' + qrFolder + ' /User:' + user + ' ' + password
qrFilename = winCMD + " " + agentcode + "_" + outlet
img.save(qrFilename + imageExt)
Error: OSError: [Errno 22] Invalid argument: 'NET USE \cmbpnh01-srv-03\Tidata\n. IT Projects\QR Code Creation\QA QR Code Creation /User:xxx\xxx xxx ALVALLSR01_ALV0030138.png'
The objective is to store all QR codes inside the shared folder path which requires credentials. You could suggest any other approaches which can achieve this objective. Thanks!