Topic "unknown command '?option'"

Author Message
paultp

Guest


Hello,

I have a strange error that happens once in a while, the Winscp commad runs just fine almost all of the times, but on few occassions, it throws this error in (see it from the log files):

2014-10-23 04:34:08.800 Script: Retrospectively logging previous script records:
> 2014-10-23 04:34:08.800 Script: ?option batch abort
< 2014-10-23 04:34:08.800 Script: Unknown command '?option'.
. 2014-10-23 04:34:08.800 Script: Failed
> 2014-10-23 04:34:08.800 Script: option confirm off
< 2014-10-23 04:34:08.800 Script: confirm off
> 2014-10-23 04:34:08.800 Script: open CloudBrickFTPS


This is the actual script commad that runs just fine all the time except on couple of these ocassions where it is failing:

***
option batch abort
option confirm off
open CloudBrickFTPS
Get /folder1/ C:\Receive\
close
exit
***

Why is the "?" mark being introduced in the script sometimes just "randomly?"

Thank you for any ideas.
Paul
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25025
Location: Prague, Czechia
The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?
_________________
Martin Prikryl
paultp

Guest


prikryl wrote:
The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Thank you Martin. I've attached the log file.
WinScpLog.txt (6.8 KB) Private file

Description: (none)

paultp

Guest


prikryl wrote:
The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.
Guest




paultp wrote:
prikryl wrote:
The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.


Adding the success attachment next.
WinScpLog.txt (6.8 KB) Private file

Description: (none)

Guest




Anonymous wrote:
paultp wrote:
prikryl wrote:
The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.


Adding the success attachment next.


Sorry the one that is attached is the error log again. Now attaching the success log.
WinSCPSuccess.txt (6.89 KB) [Download]

Description: (none)

paultp

Guest


Anonymous wrote:
Anonymous wrote:
paultp wrote:
prikryl wrote:
The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.


Adding the success attachment next.


Sorry the one that is attached is the error log again. Now attaching the success log.


One more thing to note in this issue is that the error never happens during the upload of the file (SFTP via Winscp to a remote location always is going well), but the problem happens during the download (Receive the file SFTP with WinSCP from the remote location to a local machine)
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25025
Location: Prague, Czechia
How do you provide commands to WinSCP? Are you redirecting a standard input? (I do not see any /command or /script parameters)
Guest




prikryl wrote:
How do you provide commands to WinSCP? Are you redirecting a standard input? (I do not see any /command or /script parameters)


Hi Martin,

Thanks. I am using through an SSIS SQL package. Using a StandardInputVariable, and the variable has the command script like:

"option batch abort " + "\n" + "option confirm off" + "\n" + "open CloudBrickFTPS " + "\n" + " Get " + @[User::FTPDirectory] + @[User::BakFileName] + " " + @[User::ReceivePath] +"\n" + " close " + "\n" + " exit"

And the executable is pointing to: C:\Program Files (x86)\WinSCP\WinSCP.com

This issue happened again, and immediately after the failure, I re-ran , and it ran successfully. I am a little stumped! I am also attaching the log (with both failure and the following success).

We are going live in 2 days. Appreciate your help.

Thanks again.

Paul
Winscp-11-5-14.txt (29.58 KB) Private file

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25025
Location: Prague, Czechia
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

As a workaround, can you try to assemble a command-line string using your code rather than the standard input string?
paultp1
[View user's profile]

Joined: 2014-11-06
Posts: 2
prikryl wrote:
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

As a workaround, can you try to assemble a command-line string using your code rather than the standard input string?


Hi Martin,

I sent you an email as per your note.

I will work on putting the work around.

Thank you again.

Paul
paultp1
[View user's profile]

Joined: 2014-11-06
Posts: 2
paultp1 wrote:
prikryl wrote:
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

As a workaround, can you try to assemble a command-line string using your code rather than the standard input string?


Hi Martin,

I sent you an email as per your note.

I will work on putting the work around.

Thank you again.

Paul


Hi Martin,

I am trying to install the debug, but have a question before I do:

I already have the regular Winscp program that the production server is using ( where the random error happens); shall I install the debug version on the same box? It seems like so. But, on to the point of reproducing the error, will the debug automatically capture the traces when the actual production process using the "production Winscp" runs and eventually errors? Or do I have to change my production Winscp to point to the debug release version?

Thanks so much.
Paul
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25025
Location: Prague, Czechia
paultp1 wrote:
I already have the regular Winscp program that the production server is using ( where the random error happens); shall I install the debug version on the same box? It seems like so. But, on to the point of reproducing the error, will the debug automatically capture the traces when the actual production process using the "production Winscp" runs and eventually errors? Or do I have to change my production Winscp to point to the debug release version?

You have to replace the production WinSCP with the debug one.
_________________
Martin Prikryl
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