WinSCP - 如何识别文件是否传输成功

2023-12-05

我正在使用 WinSCP 通过 SFTP 自动上传文件。我已经打开了级别1的调试日志,是否可以查看文件是否上传成功?谢谢。

日志文件的一部分:

. 2012-08-30 15:30:06.539 File: "C:\files\file_20120830.gpg"
. 2012-08-30 15:30:06.539 Copying "C:\files\file_20120830.gpg" to remote directory started.
. 2012-08-30 15:30:06.539 Binary transfer mode selected.
. 2012-08-30 15:30:06.539 Checking existence of file.
> 2012-08-30 15:30:06.539 Type: SSH_FXP_LSTAT, Size: 50, Number: 263
. 2012-08-30 15:30:06.539 Sent 54 bytes
. 2012-08-30 15:30:06.539 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.539 Waiting for another 4 bytes
. 2012-08-30 15:30:06.555 Detected network event
. 2012-08-30 15:30:06.555 Received 33 bytes (0)
. 2012-08-30 15:30:06.555 Read 4 bytes (29 pending)
. 2012-08-30 15:30:06.555 Read 29 bytes (0 pending)
< 2012-08-30 15:30:06.555 Type: SSH_FXP_STATUS, Size: 29, Number: 263
< 2012-08-30 15:30:06.555 Status code: 2
. 2012-08-30 15:30:06.555 Checking existence of partially transfered file.
> 2012-08-30 15:30:06.555 Type: SSH_FXP_LSTAT, Size: 59, Number: 519
. 2012-08-30 15:30:06.555 Sent 63 bytes
. 2012-08-30 15:30:06.555 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.555 Waiting for another 4 bytes
. 2012-08-30 15:30:06.570 Detected network event
. 2012-08-30 15:30:06.570 Received 33 bytes (0)
. 2012-08-30 15:30:06.570 Read 4 bytes (29 pending)
. 2012-08-30 15:30:06.570 Read 29 bytes (0 pending)
< 2012-08-30 15:30:06.570 Type: SSH_FXP_STATUS, Size: 29, Number: 519
< 2012-08-30 15:30:06.570 Status code: 2
. 2012-08-30 15:30:06.570 Opening remote file.
> 2012-08-30 15:30:06.570 Type: SSH_FXP_OPEN, Size: 75, Number: 771
. 2012-08-30 15:30:06.570 Sent 79 bytes
. 2012-08-30 15:30:06.570 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.570 Waiting for another 4 bytes
. 2012-08-30 15:30:06.586 Detected network event
. 2012-08-30 15:30:06.586 Received 31 bytes (0)
. 2012-08-30 15:30:06.586 Read 4 bytes (27 pending)
. 2012-08-30 15:30:06.586 Read 27 bytes (0 pending)
< 2012-08-30 15:30:06.586 Type: SSH_FXP_HANDLE, Size: 27, Number: 771
. 2012-08-30 15:30:06.586 Write request offset: 0, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 1286
. 2012-08-30 15:30:06.586 Sent 4139 bytes
. 2012-08-30 15:30:06.586 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.586 Write request offset: 4096, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 1542
. 2012-08-30 15:30:06.586 Sent 4139 bytes
. 2012-08-30 15:30:06.586 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.586 Write request offset: 8192, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 1798
. 2012-08-30 15:30:06.586 Sent 4139 bytes
. 2012-08-30 15:30:06.586 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.586 Write request offset: 12288, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 2054
. 2012-08-30 15:30:06.586 Sent 4139 bytes
. 2012-08-30 15:30:06.586 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.586 Write request offset: 16384, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 2310
. 2012-08-30 15:30:06.586 Sent 4139 bytes
. 2012-08-30 15:30:06.586 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.586 Write request offset: 20480, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 2566
. 2012-08-30 15:30:06.586 Sent 4139 bytes
. 2012-08-30 15:30:06.586 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.586 Write request offset: 24576, len: 4096
> 2012-08-30 15:30:06.586 Type: SSH_FXP_WRITE, Size: 4135, Number: 2822
. 2012-08-30 15:30:06.602 Sent 4139 bytes
. 2012-08-30 15:30:06.602 There are 0 bytes remaining in the send buffer
. 2012-08-30 15:30:06.602 Write request offset: 28672, len: 98261
> 2012-08-30 15:30:06.602 Type: SSH_FXP_WRITE, Size: 98300, Number: 3078
. 2012-08-30 15:30:06.617 Sent 98304 bytes
. 2012-08-30 15:30:06.617 There are 33208 bytes remaining in the send buffer
. 2012-08-30 15:30:06.617 Detected network event
. 2012-08-30 15:30:06.617 Received 28 bytes (0)
. 2012-08-30 15:30:06.617 Read 4 bytes (24 pending)
. 2012-08-30 15:30:06.617 Read 24 bytes (0 pending)
< 2012-08-30 15:30:06.617 Type: SSH_FXP_STATUS, Size: 24, Number: 1286
< 2012-08-30 15:30:06.617 Status code: 0
. 2012-08-30 15:30:06.617 There are 33208 bytes remaining in the send buffer, need to send at least another 440 bytes
. 2012-08-30 15:30:06.633 Detected network event
. 2012-08-30 15:30:06.633 There are 33208 bytes remaining in the send buffer
. 2012-08-30 15:30:06.633 There are 33208 bytes remaining in the send buffer, need to send at least another 440 bytes
. 2012-08-30 15:30:06.633 Detected network event
. 2012-08-30 15:30:06.633 There are 33208 bytes remaining in the send buffer
. 2012-08-30 15:30:06.633 There are 33208 bytes remaining in the send buffer, need to send at least another 440 bytes
. 2012-08-30 15:30:06.633 Detected network event
. 2012-08-30 15:30:06.633 Received 28 bytes (0)
. 2012-08-30 15:30:06.633 Read 4 bytes (24 pending)
. 2012-08-30 15:30:06.633 Read 24 bytes (0 pending)
< 2012-08-30 15:30:06.633 Type: SSH_FXP_STATUS, Size: 24, Number: 1542
< 2012-08-30 15:30:06.633 Status code: 0

引用WinSCP常见问题解答我如何知道脚本成功完成?:

您可以通过 WinSCP 退出代码来判断脚本的结果。代码0表示成功,1表示错误。欲了解更多详情,请参阅脚本编写文档。

批处理脚本(指定使用/script or /command 命令行开关) 一旦发生任何错误,立即以代码 1 终止。您可以使用以下命令更改此设置option batch命令。

要找出脚本失败的原因,请检查会话日志.

示例请参见:

  • 传输自动化指南;
  • 重试脚本/连接尝试例子;
  • 通过电子邮件发送脚本结果例子。

如果您需要更好地控制错误处理,请考虑使用WinSCP .NET 程序集相反(例如从PowerShell 脚本).

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

WinSCP - 如何识别文件是否传输成功 的相关文章

随机推荐

  • R编程中,关于逆矩阵及其乘法

    这是我在 R初学者指南 练习中的解决过程 gt Q 1 2 3 1 1 2 3 2 4 2 1 3 2 3 0 gt solve Q 1 2 3 1 0 12 0 36 0 16 2 0 08 0 24 0 44 3 0 32 0 04 0
  • 选择:jQuery 插件...在 asp.net 回发后不起作用

    我在用http harvesthq github io chosen 控制在drop down list 一切都很顺利 但我面临着一个问题 比如我是否设置下拉列表的属性 即AutoPostBack true 选择一项后控件将失去其属性并转换
  • EF Core 5 包含多个列

    我有两个模型 看起来像这样 public class Filter public string Key get set public Guid ProgramId get set public class MyEntity public s
  • Hibernate 可以使用 MySQL 的“ON DUPLICATE KEY UPDATE”语法吗?

    MySQL 支持 INSERT ON DUPLICATE KEY UPDATE 语法允许您 盲目 插入数据库 并回退到更新现有记录 如果存在 当您想要快速事务隔离并且想要更新的值取决于数据库中已有的值时 这非常有用 作为一个人为的示例 假设
  • 无法使用 Curl 将查询复制到 Amazon Manage Kindle。我缺少什么?

    由于亚马逊 管理你的 Kindle 的网络界面极其缓慢 我试图弄清楚如何构建一个应用程序来连接到为管理页面提供信息的未记录服务 我现在已经确定了要使用哪些 URL 和参数来检索执行 CRUD 操作所需的 JSON 数据 但我无法成功地使用
  • 如何在 Shiny 中创建倒计时器?

    我希望能够为我正在开发的 R Shiny 应用程序创建一个倒计时器 例如 20 分钟 然后计时器发出蜂鸣声 用户可以通过单击开始 停止 来启动 停止和重置重置按钮 我见过一些针对特定日期 时间的倒计时示例 但还没有遇到通用计时器的倒计时示例
  • PIP安装不起作用(六、numpy和python-dateutil要求)

    我是 Python 新手 想在 Mac 上安装 Python 3 5 的 Pillow 包 我用pip install pillow命令并收到此错误 Jaspers MBP jasperherrmann pip install pillow
  • Python 布尔求值顺序

    我正在使用 Python 中的链表 但无法完全弄清楚它发出的错误语句 这是我的代码 用于从列表头部开始递增节点 while current next node is not None and value gt current next no
  • 使用 asp.net 发送带有嵌入图像的邮件

    使用 asp net 发送带有嵌入图像的邮件 我已经使用了以下但它无法工作 Dim EM As System Net Mail MailMessage New System Net Mail MailMessage txtFrom Text
  • 位置广播接收器

    我知道 BroadcastReceiver 会监视文本 电话事件等 但是您可以将 LocationServices 作为基于位置的服务和事件运行吗 例如 您位于某个 GPS 点附近 手机会通知您 我想你正在寻找的是这样的东西 有一个版本Lo
  • 使用 c++ 开始 Direct X 的好书或教程 [关闭]

    Closed 此问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 目前不接受答案 我对c 非常熟悉 我用它制作了一些游戏 例如俄罗斯方块和纸牌游戏 但我真正想要的是为这些游戏提供一些漂亮的纹理图形 p GDI 不再为我做这件事了
  • 使用深度优先搜索查找到特定节点的唯一路线数

    我有一个顶点为 123456 的有向图 使用深度优先搜索 如果我希望能够找到 1 4 之间唯一路线的数量 例如 我将如何去做呢 这是我当前的 DFS private final Map
  • ASP.NET MVC3 Razor - 从字符串创建视图?

    有没有一种方便的方法可以从字符串返回视图 而不必从磁盘上的文件返回视图 我已经实现了一个自定义VirtualPathProvider它处理从数据库检索视图 但我并不总是希望视图存储在数据库中 更新 2 15 2011 我偶然发现了一个非常好
  • 使用按键 jQuery 限制键盘输入

    I have a keypress function I created with a game to take user input in a form with the enter button and to have a series
  • Netty UDP 服务器引导程序

    我发现 Netty 4 0 的所有 TCP 服务器实现都使用 ServerBootstrap 实例 服务器和客户端之间最大也是唯一的区别 Netty的不同之处在于Bootstrap和Channel的实现是不同的 用过的 请看一下下面的代码
  • 我需要清理 Java 中的 Thread 对象吗?

    在我的 Java 应用程序中 我有一个 Runnable 例如 this runner new Runnable Override public void run do something that takes roughly 5 seco
  • SQL查询更新表中的前1条记录

    谁能告诉我如何编写查询来更新表中的前 1 条记录 Thanks 您必须通过根据您决定的列进行排序来决定表中的顶部记录是什么 也就是说 您可以在 SQL Server 中执行此操作 UPDATE YourTable SET YourColum
  • Android 中退出应用程序

    我想退出 Android 中的应用程序 只需放置一个 退出 按钮 就会终止我的应用程序 我知道我不应该这样做 我知道这不是操作系统的哲学 如果您知道如何做到这一点 请分享 在应用程序中 我有许多打开的活动 因此 finish 无法完成这项工
  • 从经纬度获取国家/地区

    我想知道如何使用 JavaScript 从纬度和经度获取国家 地区名称 我愿意使用 Google 地图的 JavaScript API 我还可以获得城市和邮政编码吗 Edit 我的目标是自动填写地址字段 而不是将其显示在地图上 我不知道它是
  • WinSCP - 如何识别文件是否传输成功

    我正在使用 WinSCP 通过 SFTP 自动上传文件 我已经打开了级别1的调试日志 是否可以查看文件是否上传成功 谢谢 日志文件的一部分 2012 08 30 15 30 06 539 File C files file 20120830