File upload 使用WinSCP的SFTP传输在/command上工作,但在/script上失败
我正在尝试使用WinSCP将文件上载到远程SFTP服务器。当我使用File upload 使用WinSCP的SFTP传输在/command上工作,但在/script上失败,file-upload,ssis,sftp,winscp,ftps,File Upload,Ssis,Sftp,Winscp,Ftps,我正在尝试使用WinSCP将文件上载到远程SFTP服务器。当我使用/命令时,它可以工作,但当我使用/script参数在脚本文件中使用相同的参数时,它会失败。下面是/command参数工作的cmd屏幕截图 c:\winscp>WinSCP.com /command "open ftps://user:pass@sf-ftp.ebiaas.com/" "put filename.xml" "exit" Connecting to sf-ftp.ebiaas.com:990 ... TLS co
/命令时,它可以工作,但当我使用/script
参数在脚本文件中使用相同的参数时,它会失败。下面是/command
参数工作的cmd屏幕截图
c:\winscp>WinSCP.com /command "open ftps://user:pass@sf-ftp.ebiaas.com/" "put filename.xml" "exit"
Connecting to sf-ftp.ebiaas.com:990 ...
TLS connection established. Waiting for welcome message...
Connected
Starting the session...
Session started.
Active session: [1] user@sf-ftp.ebiaas.com
filename.xml | 7 KB | 33.6 KB/s | binary | 100%
但当我使用/script
执行相同操作时,它失败了
c:\winscp>WinSCP.com /script="C:\Development\UploadData.txt" /log=log.txt
Connecting to sf-ftp.ebiaas.com:990 ...
TLS connection established. Waiting for welcome message...
Access denied.
Authentication failed.
脚本文件UploadData.txt的内容包括:
open ftps://user:pass@sf-ftp.ebiaas.com/
put filename.xml
exit
我不确定我是否丢失了一些东西或以错误的方式使用WinSCP客户端。我读过,但它只是说,如果映射驱动器上的文件失败,访问将被拒绝。但在这两种情况下,它都应该失败。还有另一个帖子,但不确定是否相同
任何帮助都将不胜感激 使用/log=c:\path\to\log.log
开关启用两个脚本的日志记录。还可以使用/loglevel=*
开关启用密码记录
看
并比较两个日志文件,找出造成差异的原因