Hi, Kevin,
Bearing in mind that we're just talking about the SFTP part of the process... I've PGP encrypted the file first.
Also... when I first set up an SFTP to a site, I'll normally connect manually first. A lot of times you get a "do you want to install this site's certificate" message.
My SFTP upload is two pieces.
There's a batch file, which reads:
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=c:\340b\Walgreen\WalgreenWinSCPscript.txt /log=c:\340b\Walgreen\Walgreens.log
And the script file it calls consists of:
option batch abort
option confirm off
open Walgreens
option transfer binary
lcd c:\340b\walgreen
put -nopermissions -nopreservetime c:\340b\Walgreen\OutputData\9310*.pgp *.pgp
close
exit
The "open Walgreens" is opening a site I've saved in WinSCP called Walgreens.
At least one other tweak I remember is needing to tell WinSCP to store its sites setup in an INI file rather than in the registry (since I'm running this as SQL Agent, not as a logged on user.) Pic attached.
You may also find this useful:
http://winscp.net/eng/docs/guide_automationCheers,
Jane
[attachment deleted by admin]