martin wrote:
KDearing wrote:
So, please let us know if and how you were able to get this to work. Thanks in advance,
I simply should work. So if you can tell what exactly is your problem...
Hi,
My problem is that I am trying to automate a simple download from a sftp server. I've been able to get it to open a console connection but the GET command (and any other commands I've tried) are simply not run. The console just sits there awaiting me to manually type the commands. This is in-line with what I read in the documentation.
I am not at my office so I don't have the actual scripts that I tried but I've been trying something like:
winscp.exe sftp://sftpuser@someserver.somehost.com:22 /privatekey=c:\kdearing\algo\test\pkey.pph /console /script=c:\kdearing\algo\test\download_test_001.txt
download_test_001.txt:
option batch on
option confirm off
cd /ftp/OUT
get somefilename.csv c:\kdearing\algo\test\
close
exit
I've also tried to put the open in the script like:
open sftp://sftpuser@someserver.somehost.com:22
but at that point I can't even get it to connect - well, the console window closes too quickly for me to see what's going on.
Furthermore I have not been able to get the /log
=c:\kdearing\algo\test\logfile.txt
to work (which also seems to be in-line with the documentation..)
--KDearing