Running WinSCP command from Python

后端 未结 1 1453
再見小時候
再見小時候 2020-12-20 04:40

I have created the following command file with name submitCmd.txt:

open myname@ftpclients.myserve.com -privatekey=C:\\Users\\Mike\\Desktop\\uplo         


        
相关标签:
1条回答
  • 2020-12-20 05:02

    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=.

    This should work:

    subprocess.run(["winscp.com", "/script=" + cmdFile], shell=True)
    
    0 讨论(0)
提交回复
热议问题