【问题标题】:FTP transfer with WinSCP - Getting "Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead."使用 WinSCP 进行 FTP 传输 - 获取“不推荐使用脚本中的命令行参数打开会话。请改用“打开”命令。”
【发布时间】:2017-03-21 11:15:12
【问题描述】:

我使用此代码将文件从服务器复制到本地文件夹

option batch abort
option confirm off
open ftp://Emna:root@localhost
synchronize local C:\Users\User\Documents /Projets/SPR/Sources
exit

我使用以下命令运行脚本:

winscp.com /RemoteScript.txt

但它不起作用。

我收到此错误:

不推荐在脚本中使用命令行参数打开会话。请改用“打开”命令。

如何使用脚本将文件从服务器复制到本地文件夹?

【问题讨论】:

  • 错误表明服务器拒绝 SFTP,但接受 FTP。
  • 是的,但它不会将文件从 /Projets/SPR/Sources 复制到 C:\Users\User\Documents跨度>
  • 将错误消息作为文本而不是图像发布!

标签: ftp winscp synchronize


【解决方案1】:

你必须使用/script switch to specify the script file:

winscp.com /script=RemoteScript.txt

有关一般概述,请参阅guide to automating transfers from FTP server with WinSCP

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-08
    • 2016-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多