Error 9009

Advertisement

Devise
Joined:
Posts:
1
Location:
Brussels

Error 9009

Hi,
When I execute my script, I get a errorlevel 9009.
Have you info about this error
Regards

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,937
Location:
Prague, Czechia

Re: Error 9009

There's no error level 9009 in WinSCP. What are you doing actually?
_________________
Martin Prikryl

Reply with quote

Gary Lee
Guest

WinSCP batch job ends with Reason Code 9009

A question was asked about WinSCP Error Code 9009, to which the reply was given that WinSCP does not have an error code 9009. After receiving this code myself I did a bit of research. The code is apparently not from WinSCP itself, but rather from the underlying development product library (.NET ?), and indicates a malformed path for an error output file, causing the output file to not be found. In my case this was a redirected log output in a batch script that had run each day for quite some time, which implies that the error can be caused by an intermittent situation.

Example excerpt:
set /p RUNDATE=Enter text for RUNDATE (with no spaces):
<entered 20150219>

set LOGGING=C:\Production\SFTP_Servers\BALANCING\Logging
set BASE=C:\Production\SFTP_Servers\ClientA
set SFTPSCRIPTS=C:\Production\SFTP_Servers\Balancing\Windows_Scripts

winscp.com /script="%SFTPSCRIPTS%\SFTP_Script.txt" /parameter "%BASE%" >> %LOGGING%\%RUNDATE%.log

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
31,937
Location:
Prague, Czechia

Re: WinSCP batch job ends with Reason Code 9009

Thanks for sharing your findings!
_________________
Martin Prikryl

Reply with quote

Seb
Guest

Re: Error 9009

I had the same return code as you (9009) and I found that was caused by the use of winscp.exe (instead of winscp.com). I just changed that and now my return code is 0.

Hope this helps.

Reply with quote

Advertisement

RamonCar
Joined:
Posts:
5
Location:
España

Error 9009

Hello,
I've also received this error using WinSCP.exe. I solved it by adding "option batch abort" and "option confirm off" at the begining of the script.
Also, be carefull on continuation character (^) if you're using a script. It must be the last character in the line. If there is a blank after it, cmd does not join follwing lines as command parameter to WinSCP. As WinSCP does not received the last command (usually "exit"), it enters interpreter mode, thus stopping the script.

Kind regards

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
31,937
Location:
Prague, Czechia

Re: Error 9009

RamonCar wrote:

Also, be carefull on continuation character (^) if you're using a script. It must be the last character in the line. If there is a blank after it, cmd does not join follwing lines as command parameter to WinSCP. As WinSCP does not received the last command (usually "exit"), it enters interpreter mode, thus stopping the script.
Documented here:
https://winscp.net/eng/docs/faq_batch_file#newline_escaping

Reply with quote

Advertisement

You can post new topics in this forum