Topic "Upload script works from command prompt, but not from job"

Author Message
[View user's profile]

Joined: 2011-06-08
Posts: 2
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 -hostkey="key here"
put e:\ProdData\ftpexport\076\staging\*.re1

"C:\Program Files\WinSCP\" /script=e:\ProdData\ftpexport\076\scripts\076_ftpscript.scp /log=e:\ProdData\ftpexport\076\bak\ftptest.log
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26858
Location: Prague, Czechia
Please read FAQ:
Martin Prikryl
[View user's profile]

Joined: 2011-06-08
Posts: 2
martin wrote:

Thank you. I resolved the issue by making some changes to the SQL Server Agent, but this looks like the better method...I'd seen other postings about this but they were not as clear.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License