如何使用密码将本地文件加载到WINSCP?

How to load local file to WINSCP with password?

我在我的批处理脚本中使用了下面 link 中的代码。但它要求输入密码。当我为 pw 提供密码时,它不起作用。当我在命令提示符下尝试时,这是第一次询问是或否。在第二次尝试中,它不是这样问的。所以我需要批处理脚本,它需要使用密码将本地文件加载到 WINSCP。还需要回答y.

https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter5.html

我在批处理脚本中使用的示例代码:

pscp c:\documents\foo.txt fred@example.com:/tmp/foo
pw Exam454656.

pscp 有一些特定的参数。 -pw就是你要找的人。

pscp -pw Exam454656 c:\documents\foo.txt fred@example.com:/tmp/foo