嗨,编解码器和编解码器(?)我有一些麻烦,我的温西普commands...hoping,你可以协助。
我有一个调用WinSCP命令行的powershell脚本..。
$LastFile = "$A\BC0722.txt"
& 'C:\Program Files (x86)\WinSCP\WinSCP.com' /command "option batch abort" "option confirm off" "open sftp:BankOfTulsa/" "put $LastFile /incoming/temp"这部分工作很好。这叫WinSCP没问题..。
Using username "usern".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] BankOfTulsa
G:\FTP\A\ADropoff\BC0722.TXT | 2 KiB | 0.0 KiB/s | binary | 100%
Cannot close remote file 'temp'.
General failure (server should provide error description).
Error code: 4
Error message from server: Mailbox /clients/usern/pub/incoming/temp exists.
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort正如你所看到的,我得到了上面的错误.它不加载文件,但直到无法关闭远程文件临时,它看起来good...points注意.
Cannot close remote file 'temp'.
General failure (server should provide error description).
Error code: 4
Error message from server: Mailbox /clients/usern/pub/incoming/temp exists.我对WinSCP错误不太熟悉,我做了一些研究,但是没有什么能真正敲响警钟,有人知道这里发生了什么吗?
发布于 2014-08-21 15:07:25
假设/incoming/temp是一个目录,则缺少一个尾随斜杠。你应该使用:
put $LastFile /incoming/temp/仅使用/incoming/temp时,意味着要将文件上载到/incoming目录,并将其保存到temp文件中。显然与同名的现有子目录发生冲突。
引用 command的文档
最后一个参数指定目标远程目录和可选操作掩码,以便以不同的名称存储文件。目标目录必须以斜杠结尾。
通常,当打开/创建文件temp时,上传应该会失败。但在关闭文件时,您的服务器似乎只检测到冲突。
https://stackoverflow.com/questions/25428799
复制相似问题