I have created the following command file with name submitCmd.txt:
submitCmd.txt
open myname@ftpclients.myserve.com -privatekey=C:\\Users\\Mike\\Desktop\\uplo
Your command will run WinSCP like this:
winscp.com /script= C:\Users\Mike\Desktop\uploader\submitCmd.txt
What is an invalid syntax. There cannot be the space after the /script=.
/script=
This should work:
subprocess.run(["winscp.com", "/script=" + cmdFile], shell=True)