winscp.exe command via SSIS

Advertisement

jimbo20814
Guest

winscp.exe command via SSIS

Hi, when I execute a WinSCP script from via a winscp.exe command line, it works fine but doing the same via a SSIS (sql server integration services) package returns an error. In the SSIS Execute Process Task Editor I have the below settings:

Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments: /script=D:\Success_Factors\SCP_Script\JimScript.txt

Running the package returns the below:
Error: 0xC0029151 at Get files via SFTP, Execute Process Task: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe" "/script=D:\Success_Factors\SCP_Script\JimScript.txt" at "C:\Program Files (x86)\WinSCP\", The process exit code was "1" while the expected was "0".
Task failed: Get files via SFTP

The script is the below. I've XXXX the password.
option batch off
option confirm off
open sftp://ecom:XXXX@sftp4.successfactors.com
cd outgoing
get JimTest.txt D:\Success_Factors\From_FTP_Server\
exit

I'm running WinSCP 4.3.5 (build 1463) on Windows 7.

Any ideas?

Reply with quote

Advertisement

Oliphant
Guest

Re: winscp.exe command via SSIS

Suggestion : Check the FailTaskIfReturnCodeIsNotSuccessValue property of the Process in SSIS
Just set this to False. This may get you right through.





jimbo20814 wrote:

Hi, when I execute a WinSCP script from via a winscp.exe command line, it works fine but doing the same via a SSIS (sql server integration services) package returns an error. In the SSIS Execute Process Task Editor I have the below settings:

Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments: /script=D:\Success_Factors\SCP_Script\JimScript.txt

Running the package returns the below:
Error: 0xC0029151 at Get files via SFTP, Execute Process Task: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe" "/script=D:\Success_Factors\SCP_Script\JimScript.txt" at "C:\Program Files (x86)\WinSCP\", The process exit code was "1" while the expected was "0".
Task failed: Get files via SFTP

The script is the below. I've XXXX the password.
option batch off
option confirm off
open sftp://ecom:XXXX@sftp4.successfactors.com
cd outgoing
get JimTest.txt D:\Success_Factors\From_FTP_Server\
exit

I'm running WinSCP 4.3.5 (build 1463) on Windows 7.

Any ideas?

Reply with quote

Pepys
Guest

Hey jimbo20814,

Have you solved your problem and if yes how? This is really getting on my nerves now... I have tried everythhing and probably not the right solution of course...

Any help will be much appreciated :)

Regards,
Pepys

Reply with quote

Advertisement

Tom G
Guest

Resolving error with SSIS execution of WinSCP script

This happened to me too and drove me crazy.

The files that I wanted were in the root directory, meaning that I didn't need (or want) WinSCP to navigate to a new directory, but it was anyway.

By default, WinSCP remembers the last directory used, and if the last directory used was the root directory, it remembers "/" as the directory used. So, the next time you attempt to connect, WinSCP attempts to find the "/" directory, which doesn't exist.

To get around this problem:
> Edit the connection
> Select 'Advanced'
> Select 'Directories' in the Advanced settings
> Deselect ‘Remember last used directory’ and remove the “/” in the Remote directory box.

Reply with quote

silentkiller98
Guest

Re: winscp.exe command via SSIS

Oliphant wrote:

Suggestion : Check the FailTaskIfReturnCodeIsNotSuccessValue property of the Process in SSIS
Just set this to False. This may get you right through.





jimbo20814 wrote:

Hi, when I execute a WinSCP script from via a winscp.exe command line, it works fine but doing the same via a SSIS (sql server integration services) package returns an error. In the SSIS Execute Process Task Editor I have the below settings:

Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments: /script=D:\Success_Factors\SCP_Script\JimScript.txt

Running the package returns the below:
Error: 0xC0029151 at Get files via SFTP, Execute Process Task: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe" "/script=D:\Success_Factors\SCP_Script\JimScript.txt" at "C:\Program Files (x86)\WinSCP\", The process exit code was "1" while the expected was "0".
Task failed: Get files via SFTP

The script is the below. I've XXXX the password.
option batch off
option confirm off
open sftp://ecom:XXXX@sftp4.successfactors.com
cd outgoing
get JimTest.txt D:\Success_Factors\From_FTP_Server\
exit

I'm running WinSCP 4.3.5 (build 1463) on Windows 7.

Any ideas?

This worked for me! Thanks a lot.

Reply with quote

Advertisement

You can post new topics in this forum