I am using SSIS 2005 to do some SFTPtasks using WinSCP. I googled about the error but couldn’t make it work. I got this error:
[Execute Process Task] Error: In Executing “C:\Program Files\WinSCP\WinSCP.exe” “-script=C:\Documents and Settings\nian_z\Desktop\temp\SSISMovingSOA\removeSOA8.txt” at “C:\Program Files\WinSCP”, The process exit code was “1” while the expected was “0”.
Here is my WinSCP script that I use:
option batch abort
option confirm off
#open sftp://user:password@server:22
#cd /m/vo/Cont/fileftp
get OrderOutbound*
close
exit
For above script, I even tried leaving only one statement at a time, but still got error.
Here is the setup of the execute process task.

This is not an answer but an attempt to help you find a solution to your problem.
Try this:
Try the following steps to find out if your script is actually working outside of SSIS or not.
Windows Startand clickRun...cmdto open Command Prompt.removeSOA8.txtis located in the pathC:\Documents and Settings\userid\Desktop\temp\SSISMovingSOA\with spaces, then type the following command by enclosing the script path in double quotes to run the script and also use the/logoption to capture all the status messages.After the script executes, your will find that a log file named
WinSCP_log.txtwill be created in the pathC:\temp. Read through the file to identify if there are any error messages.Attempt to run FTP in SSIS:
I tried downloading a file from FTP using WinSCP with the following script:
Here are the settings how I have configured the
Execute Process Taskwithin the SSIS package.The process ran successfully in BIDS.
Hope that gives you an idea.