Too many parameters for command 'synchronize' error after added -rawtransfersettings to the script

Advertisement

kkolner
Joined:
Posts:
1
Location:
None

Too many parameters for command 'synchronize' error after added -rawtransfersettings to the script

Hi all,

I have searched about this error all day long and there is no resolution about it
So I decide to create an account just for this error
My question is,why does this error shows up only after I added -rawtransfersettings to my script file?
It runs fine without it

I am using version 5.15
And this is the content inside my script:

option batch continue

open ftp://XXXX:XXXX@ftp.domain.com

synchronize remote C:\FTP / -delete -mirror -criteria=either -transfer=binary -rawtransfersettings CalculateSize=0

close
exit

Is this a bug?
Please help to advise
Many thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,162
Location:
Prague, Czechia

Re: Too many parameters for command 'synchronize' error after added -rawtransfersettings to the script

Thanks for your report.

It is indeed a bug. I've added it to the tracker:
https://winscp.net/tracker/1731

Though CalculateSize is always 0 (turned off) in scripting. So your code will have no effect even if it worked.

Reply with quote

ansred
Joined:
Posts:
1
Location:
Toronto

I have the same issue running the command

Getting the following per the log file when running the batch file


. 2020-08-07 11:24:23.599 --------------------------------------------------------------------------
. 2020-08-07 11:24:23.599 Using SFTP protocol.
. 2020-08-07 11:24:23.599 Doing startup conversation with host.
> 2020-08-07 11:24:23.599 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2020-08-07 11:24:23.825 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2020-08-07 11:24:23.825 SFTP version 3 negotiated.
. 2020-08-07 11:24:23.825 We believe the server has signed timestamps bug
. 2020-08-07 11:24:23.825 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2020-08-07 11:24:23.825 Getting current directory name.
. 2020-08-07 11:24:23.825 Getting real path for '.'
> 2020-08-07 11:24:23.825 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2020-08-07 11:24:24.048 Type: SSH_FXP_NAME, Size: 97, Number: 16
. 2020-08-07 11:24:24.048 Real path is '/'
. 2020-08-07 11:24:24.048 Startup conversation with host finished.
< 2020-08-07 11:24:24.048 Script: Active session: [1] sftp@vpn.ans.red
> 2020-08-07 11:24:24.048 Script: 
> 2020-08-07 11:24:24.048 synchronize
< 2020-08-07 11:24:24.048 Script: Unknown command '
< 2020-08-07 11:24:24.048 synchronize'.
. 2020-08-07 11:24:24.048 Script: Failed
. 2020-08-07 11:24:24.048 Script: Exit code: 1
. 2020-08-07 11:24:24.048 Closing connection.
. 2020-08-07 11:24:24.048 Sending special code: 1
. 2020-08-07 11:24:24.478 Main session channel closed
. 2020-08-07 11:24:24.479 All channels closed


The batch file I have is:

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\Projects\Synced-winSCP-Target\sync.log" /ini=nul ^
  /command ^
    "open sftp://sftp:password@domain.com/ -hostkey=""ssh-rsa 2048 K6kzAwJ+dsOyceO4ewkFmeO31323refefefef="" -rawsettings ProxyPort=0" ^

synchronize both "C:\Projects\Synced-winSCP-Target" /Proofpoint_Corp_Personal Archive/Synced-via-WinSCP-Script

    "exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)

exit /b %WINSCP_RESULT%





Note: FYI, authentication shows successful, it's only the command is not running as expected.

. 2020-08-07 11:24:22.936 Server offered these authentication methods: password,publickey
. 2020-08-07 11:24:22.936 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2020-08-07 11:24:22.936 Using stored password.
. 2020-08-07 11:24:22.936 Sent password
. 2020-08-07 11:24:23.171 Access granted
. 2020-08-07 11:24:23.171 Opening main session channel
. 2020-08-07 11:24:23.388 Opened main channel
. 2020-08-07 11:24:23.599 Started a shell/command
. 2020-08-07 11:24:23.599
--------------------------------------------------------------------------

Any idea?

Reply with quote

Advertisement

You can post new topics in this forum