Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

sto wrote:

Sorry, another question.
I realize that, at the moment, there is no mean to use at the same time switches for synchronize, and switches inside call, as there is no WinSCP version that supports these two features.

That's correct. You can workaround that, by creating script on the server-side with the command you need to execute, so you can use the script from "call" command (without switches).
sto

Sorry, another question.
I realize that, at the moment, there is no mean to use at the same time switches for synchronize, and switches inside call, as there is no WinSCP version that supports these two features.
Am I wrong?

Thanks,
David
Guest

Owww, sorry... -__-'
I did not read carefully, I thought the problem with switches was global...
So I'm going to try 4.1.x !!
Thanks again,
David
martin

Sto wrote:

I'm sorry but this does not work...
When I call synchronize -delete remote . /home/user, I get a "Too many parameters for command 'synchronize'." error, event with WinSCP 4.0.7 .

OK, so what were you asking for? The thread is about bug in handling of switches in "call" command.

This bug was introduced in 4.1.x, with introduction of switches.
On the other hand, if you want to use switches, you have to use 4.1.x.
Sto

I'm sorry but this does not work...
When I call synchronize -delete remote . /home/user, I get a "Too many parameters for command 'synchronize'." error, event with WinSCP 4.0.7 .

Thanks,
David
martin

sto wrote:

I would like to know what is the last version of WinSCP where this bug does not appear?

The latest stable, 4.0.7.
sto

Hello,
I would like to know what is the last version of WinSCP where this bug does not appear?

Thank you,
David
martin

AdamA wrote:

is it possible to fix both bugs (call command) and (switches) in one version ?

Please wait for the next release.
AdamA

I also found this bug in version 4.1. I downgraded WINSCP to previous stable version: 4.0.7 and call command works fine however in this version in scripting mode I can not use switches for example:
put --preservertime ....
or
synchronize .... --criteria=both

is it possible to fix both bugs (call command) and (switches) in one version ?
martin

Re: Call command switches don't work

It should be working in the latest stable release (4.0.7).
landau351

Call command switches don't work

I found the same issue and am keen to see it fixed as well!
martin

Re: Script "call" cmd improperly checks WinSCP-specific swit

Thanks. This bug has been added to tracker.
andrewvog

Script "call" cmd improperly checks WinSCP-specific switches

Hello,

I recently upgraded from WinSCP 3.8 to 4.x (I experienced the following failure on both 4.0.7 and 4.1.3beta). The problem I'm seeing is that WinSCP looks for and also validates switches on the script "call" command. This is improper, because "call" invokes a remote command that has nothing to do with WinSCP's internal script syntax.

This is a serious issue for me; it prevents me from using the call command for anything but running a remote script that doesn't take parameters.

An example of a command that will (currently) fail every time is the example given in WinSCP's own site:

call mysqldump --opt -u USERNAME --password=PASSWORD --all-databases > all_databases.sql


I downloaded the source, and think I have found this bug (copied below, from Script.cpp). Note that the expression "if (!Switches ...)" seems like it should really be: "if (Switches...)".

void __fastcall TScriptCommands::CheckParams(TOptions * Parameters,

  bool Switches)
{
  AnsiString Switch;
  if (!Switches && Parameters->UnusedSwitch(Switch))
  {
    throw Exception(FMTLOAD(SCRIPT_UNKNOWN_SWITCH, (Switch)));
  }
}