CMD Script to Upload file - put is ignored
I trying to upload a file in one script line so I can easily change the file name when I generate the Shell command. I can connect to the SFTP server ok, but the put seems to be ignored. there also it does not like the key word open so I removed it and it works better.
This will login but not transfer the file (see attached log file):
"C:\Program Files (x86)\WinSCP\winscp.exe" /command /log="\\ccm-fs-01\sharedusers\SEI Export\FTP Setup\wscpresults.log" "john:password@mfd.ftp.xxxx.com/" "put c:\TestAwayTradeBlotter041516.csv " "exit"
this one will not login and tries to set the user to "open john":
"C:\Program Files (x86)\WinSCP\winscp.exe" /command /log="\\ccm-fs-01\sharedusers\SEI Export\FTP Setup\wscpresults.log" " open john:password@mfd.ftp.xxxx.com/" "put c:\TestAwayTradeBlotter041516.csv " "exit"
what is the correct syntax to upload a file?
ps. I changed the site to xxxx and my password to password in the sample.
Thank you
This will login but not transfer the file (see attached log file):
"C:\Program Files (x86)\WinSCP\winscp.exe" /command /log="\\ccm-fs-01\sharedusers\SEI Export\FTP Setup\wscpresults.log" "john:password@mfd.ftp.xxxx.com/" "put c:\TestAwayTradeBlotter041516.csv " "exit"
this one will not login and tries to set the user to "open john":
"C:\Program Files (x86)\WinSCP\winscp.exe" /command /log="\\ccm-fs-01\sharedusers\SEI Export\FTP Setup\wscpresults.log" " open john:password@mfd.ftp.xxxx.com/" "put c:\TestAwayTradeBlotter041516.csv " "exit"
what is the correct syntax to upload a file?
ps. I changed the site to xxxx and my password to password in the sample.
Thank you