WinSCP保持最新命令,无法检查更改

问题描述 投票:1回答:1

我目前正在本地环境中测试keepuptodate命令,以便在服务器上部署正确的完整命令,但keepuptodate出现问题。

我在Windows 10上使用“ Xlight FTP服务器”作为测试服务器,并且在WinSCP上将访问保存为“ test_local”(我知道这不是一个好习惯,但这只是一个测试)

我在shell中写的命令是

WinSCP.exe test_local /Console /Script=script.txt

[script.txt包含

option batch on
option confirm off
option transfer automatic
keepuptodate -delete F:\mirror_test /
close
exit

我也尝试通过启用日志记录来记录脚本

/log="F:\WinSCP.log"

选项,这是日志

. 2020-03-08 15:07:06.590 --------------------------------------------------------------------------
. 2020-03-08 15:07:06.590 Using FTP protocol.
. 2020-03-08 15:07:06.590 Doing startup conversation with host.
> 2020-03-08 15:07:06.591 PWD
< 2020-03-08 15:07:06.690 257 "/"
. 2020-03-08 15:07:06.691 Getting current directory name.
. 2020-03-08 15:07:06.691 Startup conversation with host finished.
< 2020-03-08 15:07:06.691 Script: Active session: [1] [email protected]
> 2020-03-08 15:07:06.692 Script: option transfer binary
< 2020-03-08 15:07:06.692 Script: transfer        binary    
> 2020-03-08 15:07:06.693 Script: keepuptodate F:\mirror_test /
< 2020-03-08 15:07:06.693 Script: Checking for changes started, press 'Ctrl-C' to stop...
< 2020-03-08 15:07:06.694 Script: Looking for subfolders in 'F:\mirror_test'...
. 2020-03-08 15:07:06.694 Keep up to date: Looking for subfolders in 'F:\mirror_test'...
< 2020-03-08 15:07:06.705 Script: Checking for changes in folder 1...
. 2020-03-08 15:07:06.707 Keep up to date: Checking for changes in folder 1...
. 2020-03-08 15:07:36.532 Sending dummy command to keep session alive.
> 2020-03-08 15:07:36.532 TYPE A
< 2020-03-08 15:07:37.032 200 Type set to A.

然后一切都停滞了。

windows powershell ftp winscp
1个回答
0
投票

keepuptodate命令仅在某些更改时会执行某些操作。命令启动时,如果目录未同步,则它不会同步。

要同步目录,请使用synchronize command

并且如果您仍想保持连续的更改同步,可以在synchronize后面跟随。

© www.soinside.com 2019 - 2024. All rights reserved.