Batch file Winscp put命令和开关选项
您好,我正在通过winscp使用sftp将以.txt结尾的所有文件传输到远程服务器上的目录。我遇到的问题是,我的权限和时间戳文件出现错误 我试图在put命令“-nopreservetime-nopermissions”中添加两个开关,但我不确定正确的顺序Batch file Winscp put命令和开关选项,batch-file,automation,sftp,put,winscp,Batch File,Automation,Sftp,Put,Winscp,您好,我正在通过winscp使用sftp将以.txt结尾的所有文件传输到远程服务器上的目录。我遇到的问题是,我的权限和时间戳文件出现错误 我试图在put命令“-nopreservetime-nopermissions”中添加两个开关,但我不确定正确的顺序 open sftp://username:password@myftp.com/ -hostkey="ssh-dss 1024 95:98:cb:3c:90:7b:bf:b4:3f:c3:72:b5:04:2b:b2:39" -rawsetti
open sftp://username:password@myftp.com/ -hostkey="ssh-dss 1024 95:98:cb:3c:90:7b:bf:b4:3f:c3:72:b5:04:2b:b2:39" -rawsettings FSProtocol=2
# Change the Local Directory
lcd "F:\Heartland"
# Change to the correct Remote directory
cd "/Distribution/Positive Pay1"
# List the local files
lls
# List Remote Files
ls
# Upload *.txt
put -nopreservetime -nopermissions "*.txt"
# Disconnect
close
exit
你的代码是正确的。如果不起作用,请向我们显示日志文件:
winscp/log=log.log/script=…
。