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

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

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 :D

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: