我设置了一个脚本来连接 webdav 服务器。
我用这个参数运行 winscp:
"C:\Program Files (x86)\WinSCP\winscp.com" /script=script.txt /log=winscp.log /ini=nul
那么,脚本是:
open davs://user@company.com:password@querty.sandbox.company.com/in/my.servlet/webdav/Catalogs/company/
synchronize remote -mirror D:\winscptest\files\ /in/my.servlet/webdav/Catalogs/company/
close
exit
当我运行命令时,身份验证失败,输出如下:
Connecting to host...
Authenticating...
Access denied.
Authentication failed.
Could not authenticate to server: rejected Basic challenge
Connection failed.
如果我在 winscp 中配置连接(使用 GUI),一切正常。
有人可以帮我正确配置脚本吗?
谢谢
答案 0 :(得分:0)
@MartinPrikryl 感谢您的关注。
我联系了 webdav 服务器的管理员,查看了他们那边的日志,他发现账户被封了,可能是多次尝试密码错误。
然后我知道用户名和密码必须是 url 编码才能在脚本中使用它。
@MartinPrikryl 与 winscp 的出色工作,我喜欢它。
再见