This upload script (FTPS) works fine when I run it from the command prompt, but when I run the same command from a SQL Server scheduled job, it dies on an interactive request for a password from the host I am uploading to. The log file shows that when run from the command prompt, it runs using a modified stored session, but when run from the job, it uses an ad-hoc session. I suspect if I could get the job to use the modifed stored session, it would work, but I can't figure out how...I am a VERY novice user. This is running on WindowsServer 2003 by the way, and am using the current version of WinSCP - downloaded this week.
option batch abort
option confirm off
open firstname.lastname@example.org -hostkey="key here"
"C:\Program Files\WinSCP\WinSCP.com" /script=e:\ProdData\ftpexport\076\scripts\076_ftpscript.scp /log=e:\ProdData\ftpexport\076\bak\ftptest.log
Reply with quote