【发布时间】:2020-03-09 12:16:06
【问题描述】:
我目前正在本地环境中测试keepuptodate 命令,以便在服务器上部署正确的完整命令,但keepuptodate 出现问题。
我在 Windows 10 上使用“Xlight FTP Server”作为测试服务器,我在 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] anonymous@192.168.1.81
> 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