Topic "The step did not generate any output. Process Exit Code 1."

Author Message
KGERBR

Guest


Hi,

I'm just posting this solution because it took me a long time to find it. Hopefully this will make life easier for someone else Very Happy

We use WINSCP in our SQL Server jobs to upload files to sFTP sites. Normally we export a file and upload it. In this new job we have it doesn't always produce a file in step 1, and then the sFTP part in step 2 would return this error:

The step did not generate any output. Process Exit Code 1. The step failed.

The solution was to include a DOS command before the CALL to WINSCP to first detect if there are any files to upload:

IF EXIST \\servername\dirname\*.csv CALL "E:\Program Files (x86)\WinSCP\winscp.com" /command "option batch abort" "option confirm off" "open sftp://ftpsite.com -hostkey=""keyvalue""" "cd /upload" "put -delete ""\\servername\dirname\*.csv""" "exit"
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License